[jboss-user] [JBoss Seam] - Page parameter and returnToCapturedView
fernando_jmt
do-not-reply at jboss.com
Wed Jun 27 00:22:28 EDT 2007
Hi.
I have page parameter registered with a converter which encrypts and decrypts the value, something like this:
| <page view-id="/admin/user.xhtml">
| <param name="id" value="#{userAction.id}" converter="#{cipherConverter.forLong}"/>
| </page>
|
I also have registered the following in components.xml:
| <event type="org.jboss.seam.notLoggedIn">
| <action expression="#{redirect.captureCurrentView}"/>
| </event>
| <event type="org.jboss.seam.postAuthenticate">
| <action expression="#{redirect.returnToCapturedView}"/>
| </event>
|
I have the following scenario:
1.- Log in.
2.- In the user list copy one of the urls with the page param encrypted: http://localhost:8080/myapp/admin/user.jsf?id=x5JyJWpACE4*
3.- Log off the application (I'm forcing this, but it supposes the session expired).
4.- Copy the url of the point 2. into the browser address bar, and hit enter.
5.- cipherConverter is called, specifically the getAsObject of the converter is called. Of course this method will convert the encrypted id to Long.
6.- The Login form is called, I write the account info and then log in.
7.- Immediately cipherConverter is called again. The getAsObject of the converter is called, but the value passed is the decrypted by the point 5. In this point I will always get an exception because the getAsObject expects an encrypted string, but the value passed in is an decrypted string (the long as string).
Is the execution of the point 5 right?
Why is invoking the converter first and then capturing the decrypted param?
Is there a way I can follow to get this working fine?
Thanks in advance for your help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4057940#4057940
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4057940
More information about the jboss-user
mailing list