且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

ui:repeat中有条件呈现的子类的PropertyNotFoundException

更新时间:2023-02-20 18:54:57

这是由于Mojarra <ui:repeat>的状态管理中的一个错误引起的,当您在<ui:repeat>中使用EditableValueHolder组件(输入字段)时,该错误会暴露出来.也一样该问题已根据问题3215 进行了修复.该修补程序可在 Mojarra 2.2.7 和JSF 2.0/2.1中获得.根据 Mojarra主页提供的最新版本)即可.

This is caused by a bug in state management of Mojarra's <ui:repeat> which will expose when you use EditableValueHolder components (input fields) inside the <ui:repeat> as well. This is fixed as per issue 3215. The fix is available in Mojarra 2.2.7 and for JSF 2.0/2.1 backported to Mojarra 2.1.29 as per issue 3221. So upgrading to at least that version (or just the latest available as per Mojarra homepage) should do it.

否则,您***的选择是将<ui:repeat>替换为<c:forEach>.

Otherwise, your best bet is to replace <ui:repeat> by <c:forEach>.