1 Reply Latest reply on Feb 12, 2008 11:54 AM by ilya_shaikovsky

    How to show h:messages on a modal panel

    shandor

      Hi
      I want to show main page validation errors on a pop up modal panel,
      Instead in the page body.

      Can someone tell me how to do it ?

      Thanks

        • 1. Re: How to show h:messages on a modal panel
          ilya_shaikovsky

           

          <h:form id="form">
           <h:inputText required="true" >
           <a4j:support event="onblur" oncomplete="Richfaces.showModalPanel('panel')"/>
           </h:inputText>
           <rich:modalPanel id="panel">
           <rich:messages/>
           </rich:modalPanel>
           </h:form>
          


          works fine for me. The only you need to add to my sample - check if the errors are present (to open the panel). You may use FacesContext.getMaxSeverity for this purpose.