-
1. Re: Customized message on 404-errorpage
dan.j.allen Jul 10, 2008 7:02 PM (in response to toby.tobias.hill.gmail.com)I don't think the conversation is propagated to the error page (I could be wrong). Your best bet is to throw an exception that is annotated with @HttpError. There is an example of this in chapter 3 of Seam in Action.
-
2. Re: Customized message on 404-errorpage
toby.tobias.hill.gmail.com Jul 10, 2008 7:33 PM (in response to toby.tobias.hill.gmail.com)Hi Dan, and thanks for answering,
Trowing an HttpError-annotated exception is exactly what we do ... but the message that we stuck into facesMessages just before throwing does not live to see the 404-page.
Any clever workarounds that comes into mind, or is signalling via the session-scope what's needed?
Best regards
Tobias -
3. Re: Customized message on 404-errorpage
accless Jul 14, 2008 9:59 AM (in response to toby.tobias.hill.gmail.com)As fas as i understand the SEAM ref doc (2.1.0), the conversation is propagated to the error page!
I am referring to chapter: 5.3.4
... You can also access the handled exception instance through EL, Seam places it in the conversation context, e.g. to access the message of the exception:...The ref describes an example how to access the message of the thrown exception within/from pages.xml. As SEAM places the message in the conversation, i would conclude that SEAM does NOT destroy it!
Therefore, Tobias could put any Object in the Conversation context and reference it in the error page. Or just put your customized message in the exception itself!
Greetings
PS: pls correct me if i am wrong!