3 Replies Latest reply on Dec 15, 2006 8:47 PM by zzzz8

    Passing messages using JBoss Seam managed exception handling

    zzzz8 Newbie

      I'm having some issues displaying Faces messages... Please tell me what I'm doing wrong:

      Here's a snippet of my code. I'm not sure if I'm supposed to use facesMessages or just call the constructor for the exception class, so I tried both:

      facesMessages.add(FacesMessage.SEVERITY_ERROR, "Error!");
       throw new ApplicationException("Error!");

      Here's the class definition for the ApplicationException class:

      package test;
      public class ApplicationException extends Exception {
       public ApplicationException() {
       public ApplicationException(final String inputExceptionText) {

      Here's my exceptions.xml file (a snippet):

      <exception class="test.ApplicationException">
       <redirect view-id="/pages/confirmation/applicationException.xhtml">
       <end-conversation />

      Here's the snippet of the xhtml file:

       <h:messages showDetail="true" />
       <h:commandButton value="#{messages['GoBack']}" action="go_Home" />
      The page does get redirected to /pages/confirmation/applicationException.xhtml, so at least the redirection part does work. However, no error message is displayed... The button does get displayed, so the page contents are getting rendered. What am I doing wrong (i.e. why isn't the error message shown)? Thanks!