-
15. Re: how to redirecto back to intented page after login
gavin.king Feb 13, 2007 2:31 AM (in response to gsegura)Yeah, thats wrong. Now fixed in CVS.
-
16. Re: how to redirecto back to intented page after login
gsegura Feb 13, 2007 2:33 AM (in response to gsegura)Thanks a lot for your reference. It's quite impressive the evolution speed of the framework.
By the way, the manual of 1.1.6GA doesn't contain such section (12.2.6) neither the seamspace example includes those nice tags.
Regards, -
17. Re: how to redirecto back to intented page after login
gsegura Feb 13, 2007 4:49 PM (in response to gsegura)I couln't make these feature work until I change its scope from ScopeType.CONVERSATION to ScopeType.SESSION
I noticed that it wasn't the same instance of Redirect component which has been called in captureCurrentView and returnToCapturedView, so I realized it was because of the scope.
I just don't know if will be any undesirable side effects because of the change of scope.
Is there other way to make this work? -
18. Re: how to redirecto back to intented page after login
gavin.king Feb 13, 2007 6:09 PM (in response to gsegura)captureCurrentView() begins a conversation, and returnToCapturedView() ends it, only if there is no long-running conversation already active. So you are definitely doing something wrong.
Make sure that you have no <end-conversation/> tag in the exception handler, or @End annotation anywhere. -
19. Re: how to redirecto back to intented page after login
gsegura Feb 13, 2007 6:45 PM (in response to gsegura)Indeed, I had a <end-conversation/> tag.
Thank you very much. -
20. Re: how to redirecto back to intented page after login
mgombocz Feb 23, 2007 7:23 PM (in response to gsegura)Hi,
I have following problem: if an inital GET request with parameters is sent to a restricted view,
the redirect to the login page works fine,
after successful authentication a redirect happens to the captured view,
but the request parameters are NOT restored.
This can be reproduced with the seamspace example:
- add the following to components.xml<event type="org.jboss.seam.notLoggedIn"> <action expression="#{redirect.captureCurrentView}" /> </event> <event type="org.jboss.seam.postAuthenticate"> <action expression="#{redirect.returnToCapturedView}" /> </event>
- change the redirected view in pages.xml (home.xhtml instead of register.xhtml) at<exception class="org.jboss.seam.security.NotLoggedInException"> <redirect view-id="/home.xhtml"> <message>You must be a member to use this feature</message> </redirect> </exception>
- start a browser and enter http://localhost:8080/seam-space/comment.seam?name=Mr_Smiley&blogId=2
- login with demo/demo
--> no more request parameters in the URL
I debugged Redirect.captureCurrentView() and realized that variable "parameters" gets no request parameters.
Is this possibly a bug?
Thx, Manuel -
21. Re: how to redirecto back to intented page after login
mgombocz Feb 23, 2007 7:47 PM (in response to gsegura)ooops!
Sorry, after another try it worked!
I messed up with the pages.xml files of versions 1.1.6.GA and CVS of 02-18-2007.
As soon as the request parameters are defined in<page view-id="/comment.xhtml"> <restrict/> <param name="name" value="#{selectedMember.memberName}"/> <param name="blogId" value="#{selectedBlog.blogId}"/> <navigation from-action="#{blog.saveComment}"> <redirect view-id="/blogentry.xhtml"/> </navigation> </page>
it works fine.
Thx. -
22. Re: how to redirecto back to intented page after login
shane.bryzak Feb 23, 2007 8:03 PM (in response to gsegura)I *think* this has been fixed in CVS. Could you try it with 1.1.7RC1?
-
23. Re: how to redirecto back to intented page after login
gavin.king Feb 23, 2007 8:11 PM (in response to gsegura)Nope, this is expected. Declare the parameters as page parameters and they will be preserved.