JSF/Mojarra 2.0.2:通过AJAX更新时,ui:repeat完全损坏 [英] JSF / Mojarra 2.0.2: ui:repeat is totally broken when updating via AJAX
问题描述
使用ui:repeat
来简单列出元素会产生非常奇怪的结果-添加元素时,第一个元素始终被提交前的最后一个元素 中的值替换.删除元素时也会发生同样的情况-第一个元素实际上显示了刚刚删除的元素.
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.
对于h:dataTable
来说,同样可以很好地工作.
With h:dataTable
the same works perfectly.
运行Mojarra 2.0.2.
Running Mojarra 2.0.2.
推荐答案
这可能是因为错误在Mojarra 2.0.2 中.至少在这种情况下,更新到Mojarra 2.0.3可以解决此问题.但是,该错误是指即使在2.0.3下也无法使用的情况.
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.
我只是想将其写成一个单独的问题,因为我一直遇到与ui:repeat
有关的各种问题(并提出各种问题),这又是一个具体情况.
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.
ui:repeat
的其他故障:
我的结论:整个ui:repeat
标记至少在Mojarra 2.0.2中被完全破坏了.更新到Mojarra 2.0.3可以解决一些问题.
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.
这篇关于JSF/Mojarra 2.0.2:通过AJAX更新时,ui:repeat完全损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!