Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Multiple conditional statment using JSF EL

843844Jun 2 2009 — edited Jun 2 2009
Hi,

I'm trying to run a conditional JSF[1.1] EL expression to populate the value of a datatable. I basically have 3 session managed beans with lists and depending on a type of object that's current/selected I want the datatable to display that bean's list.

Here's the expression I have so far...
value="#{IsTypeA ? TypeA.list : (IsTypeB ? TypeB.list : TypeC.list)}
{code}

TypeA.list and TypeB.list works fine, but TypeC.list doesn't. Is it acceptable to chain conditional statements in the way I've shown? My IDE (IBM RAD) warns of EL syntax error but yet it still runs. 

Thanks for advice on this. 
Scott                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 30 2009
Added on Jun 2 2009
5 comments
541 views