• Post Reply Bookmark Topic Watch Topic
  • New Topic

Composite expressions  RSS feed

 
Martin Lopez Ochoteco
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a JSF page with an outputText component that receives a value of type Long from a backing bean #{foo.value}
I need to represent this value as a 'Yes' String if it's == 1 and a 'No' String if it's == 0.
I tried something like this: #{(#{foo.value!=0})?'Yes':'No'} but it's not working.
Unified expression language states that composite expressions should be like #{’#{’}exprB} , but I can't get it to work.

Can someone help me?
Thanks in advance.
Martin.-
 
Kavita Tipnis
Ranch Hand
Posts: 177
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have the syntax wrong, el can be confusing at times


 
Martin Lopez Ochoteco
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Kavita!
I was messing things up. This syntax you provided it's much more predictable to use and it worked fine.
Martin.-
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!