-
1. Re: Seam login issue
jnusaira Aug 7, 2008 9:46 PM (in response to bashan)yes ... seam's authentication will work like that by default as long as you have these items in your components.xml
<event type="org.jboss.seam.notLoggedIn"> <action execute="#{redirect.captureCurrentView}"/> </event> <event type="org.jboss.seam.postAuthenticate"> <action execute="#{redirect.returnToCapturedView}"/> </event>
-
2. Re: Seam login issue
bashan Aug 7, 2008 10:12 PM (in response to bashan)I have already in pages.xml these lines:
<event type="org.jboss.seam.security.notLoggedIn"> <action execute="#{redirect.captureCurrentView}"/> </event> <event type="org.jboss.seam.security.loginSuccessful"> <action execute="#{redirect.returnToCapturedView}"/> </event>
I added this one:
<event type="org.jboss.seam.postAuthenticate"> <action execute="#{redirect.returnToCapturedView}"/> </event>
But it seems to be not working.
When I get to a page where login is required, I am redirected to login page, then after login I go back to the previous page. this is ok and it used to work for me before.
What I want is when used in a page that DOESN'T require a login and press the login button, to go to the login page and then move back to the page before the login.
Should this component: org.jboss.seam.postAuthenticate present this behavior? Should I do anything else, because currently it seems like it is not working...
Thanks,
Guy. -
3. Re: Seam login issue
jnusaira Aug 7, 2008 10:30 PM (in response to bashan)it goes in COMPONENTS.xml ... not pages.xml.
you put hte
exception
's in pages.xml not events. -
4. Re: Seam login issue
bashan Aug 8, 2008 9:24 AM (in response to bashan)Sorry, of course I was putting these lines in components.xml, I just wrote pages.xml by mistake...
So, should I write the 2 tags I am using and this one as well:
<event type="org.jboss.seam.postAuthenticate"> <action execute="#{redirect.returnToCapturedView}"/> </event>
or should I use the whole 3 tags?
-
5. Re: Seam login issue
viktor.vra.geus.dk Mar 25, 2009 1:39 PM (in response to bashan)Did you solve the problem? I want to do exactly the same in my project.