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() {
| super();
| }
|
| public ApplicationException(final String inputExceptionText) {
| super(inputExceptionText);
| }
| }
Here's my exceptions.xml file (a snippet):
<exception class="test.ApplicationException">
| <redirect
view-id="/pages/confirmation/applicationException.xhtml">
| </redirect>
| <end-conversation />
| </exception>
Here's the snippet of the xhtml file:
<ui:composition>
|
| <h:messages showDetail="true" />
|
| <h:form>
| <h:commandButton value="#{messages['GoBack']}"
action="go_Home" />
| </h:form>
| </ui:composition>
| |
| | 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!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992404#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...