在我的应用程序中,我创建了一个向导。似乎我无法切换面板,因为在未显示的面板上验证失败。
该向导具有以下布局:
<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 时,什么也没有发生。如果我从组件中删除必填字段,则切换工作。
如何仅对当前显示的组件进行正确验证?