Forums Register Login
JSF EL conditional statement returning a jsf el syntax problem
I am trying to use jsf el to to a conditional statement in my faces-config.xml file.

<key>#{ (currentUserRole.userInSecureRole==true) ? agsws3 : agsws0}</key>

works perfectly

the problem is the next line needs to be

<value>#{ (currentUserRole.userInSecureRole==true) ? #{agsws3} : #{agsws0}}</value>

which of course doesnt parse

basically if it fails check it needs to be


and if it passes


please help! thank you.
When you use #{agsws0} it is going to start looking for a <key>agsws0</key>. Which is in the process of getting defined. So there is a cyclical dependency.

So what is the value of #{agsws0}?
#{agsws0} is another managed bean

basically i have a resource bean

that bean has properties that are a list of other beans




the <key>agsws0</key> is just the name of the value, so no cyclical dependency.

My problem is i need the jsf el conditional statement to return a reference to a bean #{agsws0} and not a string

Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards

This thread has been viewed 4083 times.

All times above are in ranch (not your local) time.
The current ranch time is
Sep 18, 2018 14:13:29.