JSF / Mojarra 2.0.2: ui:repeat is totally broken when updating via AJAX

核能气质少年 提交于 2019-12-11 12:07:51

问题


Using ui:repeat for simple listing of elements produces very strange results - when you add an element, the first element is always replaced with the values from the last element before the submit. Same occurs when removing the elements - the first element shows actually the just removed element.

With h:dataTable the same works perfectly.

Running Mojarra 2.0.2.


回答1:


This is probably because bug in Mojarra 2.0.2. At least in this case, updating to Mojarra 2.0.3 resolves the issue. However, the bug refers to cases that won't work with even 2.0.3.

Just wanted to write this up into a separate question as I've been having all sorts of problems (and asking all sort of questions) relating to ui:repeat and this is a specific case again.

Other failings with ui:repeat:

  • Why doesn't h:dataTable inside ui:repeat get correct ID?
  • How to refer to dataTable parent within the dataTable?

My conclusion: the whole ui:repeat tag is totally broken at least in Mojarra 2.0.2. Updating to Mojarra 2.0.3 fixes some of the issues.



来源:https://stackoverflow.com/questions/3890862/jsf-mojarra-2-0-2-uirepeat-is-totally-broken-when-updating-via-ajax

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!