-
1. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
tremes Apr 4, 2013 2:08 AM (in response to thospfuller)Hi Thomas!
I guess that the action from org.jboss.seam.security.Identity.login() is called and this action returns "loggedIn" if user is successfully authenticated. So if you don't specify any additional navigation rule, you will be routed to page with the same name.
-
2. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
thospfuller Apr 4, 2013 2:30 PM (in response to tremes)Thanks for your response.
I'm comparing the pages.xml file with the same from an earlier, working, version of this application and there's no mention of loggedIn. The pages.xml file has the following:
<page view-id="/*" action="#{identity.login}">
<navigation>
<rule if-outcome="home">
<redirect view-id="/home.xhtml"/>
</rule>
</navigation>
</page>and the login process works fine.
I've tried adding:
<page view-id="/*" action="#{identity.login}">
<navigation>
<rule if="#{identity.loggedIn}">
<redirect view-id="/home.xhtml"/>
</rule>
</navigation>
</page>However all I get then is a loop, where the app appears to keep requesting home.
Tom
-
3. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
tremes Apr 5, 2013 3:55 AM (in response to thospfuller)1 of 1 people found this helpfulSince you are executing #{identity.login} on every page and you are authenticated (#{identity.loggedIn} is true), you really keep requesting your home.xhtml. I guess that you want something like:
....
<navigation from-action="#{identity.login}">
<rule if="#{identity.loggedIn}">
<redirect view-id="/home.xhtml"/>
</rule>
</navigation>
....
-
4. Re: Seam 2.2.2 and loggedIn.seam -- where is this coming from?
thospfuller Apr 5, 2013 2:56 PM (in response to tremes)Hi Tomas
Pretty close.
Thanks for your help,
Tom