6 Replies Latest reply on Jul 5, 2007 1:57 AM by thiagu.m

    i can't invoke modal panel by using JSF component

      Hai, i am not successes when i am invoke modal panel by using any of the
      JSF component
      plese any any one give me the right solution

      Here i give my sample code

      
      <a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">Login</a> //It's work fine
       <h:commandButton onClick="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})" value="Login"/> //It's not work proper
       <h:commandLink onClick="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})" value="Login"/> //It's not work proper
      
      
       <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>
       <f:facet name="controls">
       <a href="javascript:Richfaces.hideModalPanel('mp')">X</a>
       </f:facet>
       <h:form id="login_form">
      
       <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}"/>
      
       <font color="red"><h:messages /></font>
       <h:commandButton value="Login" action="#{identity.login}"/>
       <h:commandButton value="Cancel" onClick="javascript:Richfaces.hideModalPanel('mp')"/>
       </h:form>
      
       </rich:modalPanel>


      and also when i click the login button with worng username and password , iam not get the error message on the modal panel , because when the form submited the modal pane will be disappeared, it is possible to stable that panel when i submit the form



      By

      Thiagu.m