You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.
| Online: | 11 Members of 4090 |
| Forum: Seam Users |
21. Feb 2008, 09:22 CET | Link |
I have a login page. When the login succeds a new conversation is initiated and the user is redirected to the main program page. This works fine.
Is there a way to directly create a conversation and redirect the user to the main page if 1. the user already loggen in and 2. has an active Session and 3. tries to open the login page?
I currently use a custom authorisation function.
Thank you in advance.
Uwe Müller
how about an if-navigation rule on identity.loggedIn that redirects you?
If a man speaks in the forest and there is no woman around to hear him, is he still wrong?
I already have an if navigation rule in my pages.xml file But this only seems to be evaluated after the login button is pressed.
<page view-id="/home.xhtml"> <navigation> <rule if="#{userSession.loggedIn}"> <redirect view-id="/workspace.xhtml"/> </rule> </navigation> </page>A page action itself may be executed at start, but how is possible to initiate a conversation, save some Data in this conversation and redirect to if the session is already open.
Use a page action, the evaluated before you render the page.
Read about how to report a bug.
I tried a solution with a page action. But how can a page action create a new conversation only if the user already has a session and then perform a redirect?
My current is to include javascript that will click the login button on the first page if the user already logged in.
I was also wondering this myself. did you solve this. I actually tried to have my action throw an exception that should have been caught and redirected by my exception handler. Originally my login page worked and rendered fine...once I added the code to throw exception in redirect, the login page no longer works for someone not logged in. when it tries to render, I get which is really funny because the action has nothing to do with the login component...ie. no changes to login component are made. I just remove the action and it works again, put back the action and the navigation component fails.
What version of Seam? This sounds like a bug in exception handling.
Read about how to report a bug.