This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JSF 2 Ternary Operator Problem  RSS feed

 
Prithvi Sehgal
Ranch Hand
Posts: 774
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

I am facing a problem which i think can be solved using JSF EL Ternary operator. I know how it works. The problem is, on based on a locale
code, i want to pick a specific managed bean property. But it is not working the way, i thought it would. Can anyone help me with the correct
syntax.


Please help. Thanks.
BR,
 
Prithvi Sehgal
Ranch Hand
Posts: 774
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

It was syntax issue. The correct syntax is


If anyone faces same problem, so this is the version.
BR,
 
Tim Holloway
Bartender
Posts: 18713
71
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
An even better approach is to forget about doing this in EL and supply an I18N support backing bean so that you can simplify the EL down to something like this:


EL can be a royal pain to debug, plus when you splatter all that conditional logic all over your View definitions, it makes maintenance more expensive.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!