This content has been marked as final.
Show 1 reply
-
1. Re: rule-if logic not occuring
pjot Apr 10, 2010 2:46 PM (in response to chris.simons)Hi, if your #{currentUser.firstLogin} expression returns boolean true/false it would not work since the outcome of the rule
s if-outcome clause is expecting a String. Rewrite your firstLogin method to return a String "true"/"false" or outject some boolean value to, for example, event scope and evaluate it in rule
s if clause:@Out(scope=EVENT) private boolean firstLogin = false; public void firstLogin() { if(foo) firstLogin = true; else firstLogin = false; }
and in the pages.xml :
<navigation from-action="#{identity.login}" evaluate="#{currentUser.firstLogin}"> <rule if="#{firstLogin}"> <redirect view-id="/pm/pds/wizard/profileWizard.1.xhtml"/> </rule> <rule if="#{!firstLogin}"> <redirect view-id="/home/home.xhtml"/> </rule> </navigation>
otherwise use set/getter for member firstLogin and dont outject it to any scope