Meaningless Drivel is fun!*
The moose likes JSF and the fly likes Logical Operators in JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Logical Operators in JSF" Watch "Logical Operators in JSF" New topic
Author

Logical Operators in JSF

Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
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

Joined: Jun 25, 2001
Posts: 15957
    
  19

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!


Customer surveys are for companies who didn't pay proper attention to begin with.
Higgledy Smith
Ranch Hand

Joined: Mar 07, 2006
Posts: 192
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

Joined: Jun 25, 2001
Posts: 15957
    
  19

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Logical Operators in JSF
 
Similar Threads
Resetting bean value in JSF
jsf Logical Not
answer the question from scjp5.0
Redirect in a JSF page itself dependent on which panelGrid is rendered:
compound assignment operator doubt