2
类似于here我使用抽象类来键入项目集列表 的ui:重复。具体子类覆盖对GetType()方法,其用于 有条件地呈现其特定性质的各亚型:有条件地呈现JSF中的子类ui:重复标记
<!-- AbstractAction Rule#getActions() -->
<ui:repeat value="#{rule.actions}" var="action">
<!-- render when "action" instance of NotificationAction -->
<h:panelGroup rendered="#{action.type == 'notification'}">
... UI for NotificationAction properties
<h:panelGroup rendered="#{action.type == 'callback'}">
...
当在Glassfish 3运行有关于未在列表中的 成员定义的属性的错误其他亚类(PropertyNotFoundException),其发生在 实际上由渲染属性关闭一个分支。 C:的forEach/C:选择似乎并不 合适。任何想法如何使渲染真正有条件并绕过 属性检查高度赞赏!
谢谢。 哈罗
重复的http://stackoverflow.com/questions/22613193/javax-el-propertynotfoundexception-when-submitting-uirepeat-with-conditionally/ – BalusC 2014-08-12 18:38:35