4 Replies Latest reply on Apr 19, 2010 8:07 AM by krishnakishu

    rich:modalPanel closing without doing validations

    krishnakishu

      I am displaying a modal window in which I am allowing user details to edit.

      In that modal window, the user has to give some mandatory data. Even if the mandatory data is not provided, modal window is closing on clicking "Update" button (which is the submit button in modal window).

       

      Below is the sample code for modal window :

       

      <rich:modalPanel id="editPanel">

       

      <h:outputLabel value="User Name :"/>

      <h:inputText value="#{beanName.input1}" required="true" requiredMessage="Please provide user name"/>

       

      <a4j:commandButton value="updateUser" action="#{beanName.updateMethod}" reRender="someId"

            ncomplete="if(#{facesContext.maximumSeverity == null}) #{rich:component('editPanel')}.hide();"/>

      </rich:modalPanel>

       

       

      Is there any problem in my <a4j:commandButton ...> code?

      If so please help me?