[jboss-user] [JBoss Seam] - Re: problem with exception handling
Andy Gibson
do-not-reply at jboss.com
Sat Dec 1 22:36:33 EST 2007
I was playing around with exception handling and had the same problem.
After a bit of fiddling around, it seems the Seam exception redirects can only occur prior to the render response phase (i.e. such as in the invoke application phase) which makes sense since when you get to the rendering stage, you are already past the process of navigation handling.
Try this in your pages.xml
|
| <page view-id="mypage.xhtml" action="myBean.causeException">
| </page>
|
in your bean use your code :
| public void causeException() {
| facesMessages.add("TestMessage");
| throw new Exception("test");
| }
|
Go to mypage.seam and this should give you the result you are looking for.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4109600#4109600
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4109600
More information about the jboss-user
mailing list