1 Reply Latest reply on Aug 27, 2010 10:14 AM by Siva P

    Trouble with validation in ModalPanels

    Dominic Warzok Newbie

      Hi together,


      I have some trouble with my ModalPanels.


      They didn't close if I press the Save Button and all things are ok. Or they close always so that the validation error is ignored and you see it only if you open the panel again.


      Maybe someone of you have an idea how to fix this.


      Here is the code of my panel


      <rich:modalPanel id="publisherPanel" width="300" height="200">


      <s:div id="publisherPanelOuterDiv">


      <h:form id="publisherPanelForm">


      <h:panelGrid columns="1">


      <s:decorate template="/layout/edit.xhtml">
      <ui:define name="label">Name:</ui:define>
      <h:inputText id="name" value="#{publisherHome.instance.name}"
      required="true"  />




      <a:commandButton value="Save"
      reRender="publisherFieldListMenu, publisherPanelOuterDiv"
      oncomplete="if(name == true) Richfaces.hideModalPanel('publisherPanel') " />




      <a:commandButton value="Cancel"
      rendered="#{publisherHome.panelActive}" /


      <h:messages globalOnly="true"
      styleClass="message" errorClass="errormsg" infoClass="infomsg"
      warnClass="warnmsg" rendered="#{showGlobalMessages != 'false'}" />






      thanks in advance



      PS: Sry for my bad english but I don't use it often