3 Replies Latest reply on Jun 28, 2007 12:47 AM by alex rozario

    i cant use commandButton within modal panel

    alex rozario Newbie

      Hai, i am not successes when i am using from field with in modal panel
      because when i submit the form the modal panel going to disappeared
      i want it will be stable on when the form fields are not correct .

      i have one more doubt, it is possible to invoke the modal panel when i click the commandButton?

      i give my sample code here

      <a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">Login</a>
       <rich:modalPanel id="mp" minHeight="200" minWidth="450" height="200" width="500" zindex="2000">
       <f:facet name="header">
       <h:outputText value="Login Form" />
       <f:facet name="controls">
       <a href="javascript:Richfaces.hideModalPanel('mp')">X</a>
       <h:panelGrid columns="2" rowClasses="prop" columnClasses="name,value">
       <h:outputLabel for="username">Username</h:outputLabel>
       <h:inputText id="username" value="#{identity.username}"/>
       <h:outputLabel for="password">Password</h:outputLabel>
       <h:inputSecret id="password" value="#{identity.password}"/>
       <h:outputLabel for="rememberMe">Remember me</h:outputLabel>
       <h:selectBooleanCheckbox id="rememberMe" value="#{identity.rememberMe}"/>
       <font color="red"><h:messages /></font>
       <h:commandButton value="Login" action="#{identity.login}"/>
       <h:commandButton value="cancel" onClick="javascript:Richfaces.hideModalPanel('mp')"/>