7 Replies Latest reply on May 19, 2008 12:11 PM by sergeysmirnov

    display faces message on modalPanel?

    lmk

      Hello,

      it is possible to show modalPanel, if exist validation or conversion error., and display the faces message ..?

      thanks!

        • 1. Re: display faces message on modalPanel?
          ilya_shaikovsky

          yes. Just place the messages in modal Panel. And check in oncomplete if the FacesContext.maximumSeverity not equals null - show the panel

          • 2. Re: display faces message on modalPanel?
            lmk

             

            "ilya_shaikovsky" wrote:
            yes. Just place the messages in modal Panel. And check in oncomplete if the FacesContext.maximumSeverity not equals null - show the panel


            I dont found how to use EL boolean expression and javscript code to show modalPanel.

            So i look at the modalPanel doc and i found a useful parameter : showWhenRendered

            the code below works:

            <rich:modalPanel id="_panel_error" headerClass="tab_title" height="110"
             width="550" showWhenRendered="#{facesContext.maximumSeverity !=null}">
             <f:facet name="header">Login errors</f:facet>
             <f:facet name="controls">
             <h:graphicImage value="/images/close.png" style="cursor:pointer"
             onclick="Richfaces.hideModalPanel('_panel_error')" />
             </f:facet>
             <rich:panel style="border:0;height:100px">
             <rich:message for="validate_login" layout="list">
             <f:facet name="header">
             <h:outputText value="Entered Login informations:"></h:outputText>
             </f:facet>
             <f:facet name="errorMarker">
             <h:graphicImage value="/images/error.gif" />
             </f:facet>
             </rich:message>
            
             </rich:panel>
            
            
             </rich:modalPanel>
            
            


            • 3. Re: display faces message on modalPanel?
              djkrite

              Thanks for this. Another good to know item. This panel always appears in the upper left hand corner on firefox. How can I get this panel centered?

              • 4. Re: display faces message on modalPanel?
                djkrite

                Same code gets centered in ie.

                • 5. Re: display faces message on modalPanel?
                  lmk

                  try

                  autosized="true"






                  • 6. Re: display faces message on modalPanel?
                    djkrite

                    still a no go in firefox:

                    <rich:modalPanel id="error" autosized="true" showWhenRendered="#{facesContext.maximumSeverity !=null}">
                    <f:facet name="header">Message:</f:facet>
                    <f:facet name="controls">
                    <h:graphicImage value="/images/close.png" style="cursor:pointer" onclick="Richfaces.hideModalPanel('error')" />
                    </f:facet>
                    <table class="blank" style="font-size: 10pt; white-space: nowrap">
                    <nobr>
                    <rich:messages>
                    <f:facet name="errorMarker">
                    <h:graphicImage value="/images/error.gif" />
                    </f:facet>
                    <f:facet name="warnMarker">
                    <h:graphicImage value="/images/info.gif" />
                    </f:facet>
                    <f:facet name="infoMarker">
                    <h:graphicImage value="/images/passed.gif" />
                    </f:facet>
                    </rich:messages>
                    </nobr>
                    </table>
                    </rich:modalPanel>


                    • 7. Re: display faces message on modalPanel?