【发布时间】:2012-04-19 14:00:05
【问题描述】:
在我的应用程序中,我创建了一个向导。似乎我无法切换面板,因为在未显示的面板上验证失败。
向导的布局如下:
<rich:modalPanel>
<f:facet name="header">
<h:outputText value="#{messages['motivation.title']}" />
</f:facet>
<h:messages />
<rich:togglePanel id="motivationTogglePanel" switchType="ajax" initialState="wiz1" rendered="#{motivationController.enabled}">
<f:facet name="wiz1">
<f:subview id="wiz1sub">
<rich:toggleControl value="next" switchToState="wiz2"></rich:toggleControl>
</f:subview>
</f:facet>
<f:facet name="wiz2">
<f:subview id="wiz2sub">
<h:selectManyCheckbox id="checkBoxList1" required="true" value="#{controller.selectedValue}" layout="pageDirection">
<f:selectItems value="#{controller.options}"></f:selectItems>
</h:selectManyCheckbox>
</f:subview>
</f:facet>
</rich:modalPanel>
modalPanel 从 wiz1 面板开始正确显示。现在,当用户单击 toggleControl 时,什么也没有发生。如果我从组件中删除必填字段,则切换工作。
如何仅对当前显示的组件进行正确验证?
【问题讨论】:
-
我已将 togglePanel 替换为普通面板,并使用控制器属性重新渲染正确的面板。
标签: validation richfaces seam2