[jboss-user] [JBoss Seam] - Preprocessing constraints for pages

dmitriy.lapko do-not-reply at jboss.com
Wed Nov 28 06:01:49 EST 2007


Is there any convenient ways to check some constraints before processing the request to any view? Something like  but not so bounded to access rights. Something like navigation rule but before execute action phase.

Simple example, and ALL needs it: 
I want to redirect already loginned user to welcome page, if he tries to visit login page. No error messages, no warnings. 

I don't want to create special user rights for this or add page action which will check if user is already loginned and then process special outcome from this action - this inforces me to do something that can break my previous logic. 

So, I just want to add to  some pre-condition with navigation which should be done if this condition is true.
Like:

<page view-id="/item.xhtml">
  |    <navigation>
  |       <rule if-before="#{indentity.loggedIn}">
  |          <redirect view-id="/welcome.html"/>
  |       </rule>
  | </page>
  | 

How can I do it in Seam 2.0 GA?




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

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



More information about the jboss-user mailing list