2 Replies Latest reply on Aug 21, 2009 3:08 PM by Alex Cougarman

    Show rich:Panel if there are error messages

    Alex Cougarman Apprentice

      I've been struggling with this: How do you show a rich:Panel if the page has hit errors? Here's the pertinent code in my form; I hit the commandButton to activate the validation. The rich:messages display fine outside of the outputPanel, but the rich:panel doesn't show at all:

      <a4j:outputPanel rendered="#{facesContext.maximumSeverity == null ? 'false' : 'true'}" id="errors">
       <rich:panel >
       <f:facet name="header">
       The following errors occurred on the page:
       </f:facet>
       <rich:messages />
       </rich:panel>
      </a4j:outputPanel>
      
      <a4j:commandButton action="#{utilities.sendEmail('/pages/media-request/mail.xhtml')}" type="submit" value="Submit"
       reRender="errors" eventsQueue="foo" id="btnSubmit" />