Yes, you can fire an action before render.
I resolved a similar problem as follows:
| <page view-id="/login.xhtml"
action="#{authenticator.checkIfLoogedIn}">
| <navigation from-action="#{authenticator.checkIfLoogedIn}">
| <rule if="#{identity.loggedIn}">
| <redirect view-id="/home.xhtml"/>
| </rule>
| </navigation>
| <navigation from-action="#{identity.login}">
| <rule if="#{identity.loggedIn}">
| <redirect view-id="/home.xhtml"/>
| </rule>
| </navigation>
| </page>
|
The authenticator.checkIfLoogedIn method is called before render the page (it is an empty
dummy method). So, if the user is already logged in he is redirected to correct page
instead showing the login page again.
HTH.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036784#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...