2010-12-20 2 views
1

rich 내부의 데이터 유효성을 검사하려고합니다. modalPanel; 내가 보는 행동은 아주 이상합니다.rich : 유효성 검사없이 modalPanel이 닫습니다.

드롭 다운에 드롭 다운이 있고 추가 버튼을 클릭하면 드롭 다운에 데이터를 추가 할 때 처음으로 추가 버튼을 클릭하여 유효성 검사가 성공적으로 완료됩니다. 사용자가 처음으로 newAddUserDialog를 열어 두 번째로 새 데이터를 입력하려고합니다. 유효성 검사가 실패하면 모달 패널이 숨겨집니다. 모달 패널 (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> 

이러한 동작의 원인은 무엇일까요?

답변