This content has been marked as final.
Show 2 replies
-
1. Re: problem with exception handling
andygibson Dec 1, 2007 10:36 PM (in response to x490812)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.