[jboss-user] [JBoss Seam] - pages.xml redirect if loggedIn

damianharvey do-not-reply at jboss.com
Thu Apr 12 10:48:13 EDT 2007

My understanding is that navigation rules in pages.xml fire after the page render (eg. after an action). Is there any way to use a navigation rule to fire before the render (ie. similar to an action)?

Currently I have a rule in my login.page.xml that redirects users to the home page after they login successfully. This works fine, however if a user has bookmarked the login page and calls it again after login, the navigation rule is not hit (as it is before the render) and the login page is displayed again - and typically the user thinks that they've been logged out.

  | <page>
  | 	<navigation>
  | 		<rule if="#{identity.loggedIn}">
  | 			<redirect view-id="/secure/home.xhtml"/>
  | 		</rule>
  | 	</navigation>
  | </page>

This same rule exists in the Booking example and the same behaviour occurs. 

I've designed around this but am still curious as to how pages.xml might be used to get around this.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4036748#4036748

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4036748

More information about the jboss-user mailing list