This content has been marked as final.
Show 3 replies
-
1. Re: Displaying message after logout
pmuir Jan 3, 2008 2:05 PM (in response to seamdev)Observe the org.jboss.seam.security.loggedOut event
-
2. Re: Displaying message after logout
seamdev Jan 4, 2008 6:22 PM (in response to seamdev)
I need little more direction here. I have got an observer for logout event setup. What should this observer method do? What should be the scope of bean containing observer method? Messages added to current instance of javax.faces.FacesContext don't show up on next page. The observer method is getting executed (can see log statements from this method).
Also, if I want to display additional message after logout based on an other event my app raises while the user is logged in, will this approach work? -
3. Re: Displaying message after logout
jacob.orshalick Jan 4, 2008 6:53 PM (in response to seamdev)"seamdev" wrote:
Messages added to current instance of javax.faces.FacesContext don't show up on next page.
You should add messages to the Seam FacesMessages component as it is scoped to the conversation which is carried across redirects...
Then again, I believe you are going to have issues here regardless because from my recollection the session is expired by the identity.logout action. The FacesMessages component is scoped to the conversation and the conversation is destroyed along with the session. Thus, any messages you have added will be gone when a new session is created and a temporary conversation is started.
Try out the FacesMessages component though, and let me know what happens...
I wrote a blog posting a little while back on differentiating between a fresh login, session expired, and logout:
http://solutionsfit.com/blog/2007/11/16/session-expired-messages-using-seam-security/
It doesn't address your exact scenario but will provide a little insight into the messaging issues with security.