1
私は豊富な内部のデータを検証しようとしています:modalPanel;私が見る行動はかなり奇妙です。rich:modalPanelが検証なしで閉じる
ドロップダウンリストにデータを追加しようとすると、そのドロップダウンに最初にドロップダウンと追加ボタンが表示されます。追加ボタンをクリックすると、検証が成功します。最初にnewAddUserDialogを開いて新しいデータを2回目に入力しようとします。検証が失敗すると、モーダルパネルは単に非表示になります。モーダルパネル(a4j:commadButton内のonCompleteイベント)を隠すためのコードを削除しても、ウィンドウは単にボタンをクリックするだけで閉じます。
<rich:modalPanel id="newAddUserDialog" autosized="true">
<a4j:outputPanel id="addName_panel"
styleClass="largePanel">
<a4j:form>
<rich:messages layout="list" showDetail="false"
errorClass="validationError" />
<h:panelGrid columns="2" cellpadding="10" cellspacing="10" width="100%">
<h:outputLabel value="Name:" styleClass="label" />
<h:inputText id="nameId"
value="#{formBean.name}" maxlength="32"
required="true" styleClass="width100">
<f:validateLength minimum="3" maximum="32" />
</h:inputText>
</h:panelGrid>
<h:panelGrid cellpadding="10" cellspacing="10" width="100%">
<h:panelGroup>
<a4j:commandButton id="addBtn" value="Add"
styleClass="stdButton" action="doAddUserName"
reRender="addName_panel, targetsMaster">
<rich:componentControl for="newAddUserDialog"
event="oncomplete"
operation="#{(!modelValidationMessages.hasMessages and empty facesContext.maximumSeverity) ? 'hide' : 'focus'}" />
</a4j:commandButton>
<a4j:commandButton id="addUser_cancel" value="Cancel"
styleClass="stdButton">
<rich:componentControl for="newAddUserDialog" event="onclick"
operation="hide" />
</a4j:commandButton>
</h:panelGroup>
</h:panelGrid>
</a4j:form>
</a4j:outputPanel>
</rich:modalPanel>
このような現象は、どのような原因が考えられますか?