[jboss-user] [JBoss Seam] - Sometimes error messages shown only after page refresh
do-not-reply at jboss.com
Thu Dec 27 05:58:56 EST 2007
I faced strange behaviour when tried to display error page for all uncatched exceptions: sometimes error messages are displayed, sometimes I see empty error page and need refresh page to see messages.
My error page
| <ui:composition template="/jspx/template.jspx"
| <ui:define name="pageContent">
| There has been an error.
Global exceptions handler declared in pages.xml
| <redirect view-id="/error.jspx">
| Unrecoverable error. If you edited some data then these have not been saved. Details:
Seam debug mode and facelet development mode are disabled.
How I tested: Open form and enter duplicate value to unique field, JDBC driber throws ConstraintViolation exception, it successfully propagated to declared handler, it successfully adds error message to FacesMessages.instance(), and redirects to error.jspx BUT when page opens I sometimes do not see messages and need to refresh page.
Looks like there is some racing between handled exception processing and next page rendering - sometimes messages are added BEFORE page rendered and all is ok, sometimes page rendered BEFORE messages added and I need refresh.
Under debugger all works fine (as I understand my breakpoints suspends page rendering so there is no racing).
What to do?
Thanks in advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115675#4115675
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115675
More information about the jboss-user