This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logical Operators in JSF

 
Higgledy Smith
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using ICEfaces v1.8

Are logical operators available in JSF?

I am trying to control rendering of three components. I have tried to use an AND like below, both did not work. Any help is much appreciated. Thank you.
Higgledy

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think about it. You're working with an XML type of source format. You're using "&" characters. Does that suggest anything?

Although you could use an entity escape, EL has a nicer way to handle that:


Even better, the word "not" is also supported. As an attention-getter, it's a lot better than "!", and considering the difference between "x" and "not x"... Well, it's like Night and Day!
 
Higgledy Smith
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Holloway wrote:Think about it. You're working with an XML type of source format. You're using "&" characters. Does that suggest anything?
[code]

It suggests that I am still learning. Thanks for your help.
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's something worth learning, then!

& < > " '

These are the 5 "magic" characters in XML:

& < > " '

When used in their natural forms, you can construct ambiguous or invalid XML, so these 5 characters have entity definitions as listed above.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic