This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm using MyFaces 1.1.6 withi Tomahawk 1.1.9 on JBoss 5.1. I have
Thing is, if the value is empty, what actually gets output is " ", but I don't want this ... I want " ". However, I do want the value of "contactInfo.organization" to be escaped. Not sure if "escaped" is the right word to use here but hopefully you know what I'm talking about.
I think that you're doing this the hard way. And I'm not 100% sure that EL supports the trinary operator, but I'm too lazy to RTFM.
If the property value is null or an empty string, nothing will display. Otherwise the value will display. When you said display " ", it took you at your word. Since HTML is normally insensitive to spaces, it forced a space entity ( ) to ensure that what displayed was what you told it to. Notice I didn't say "what you wanted"!
An IDE is no substitute for an Intelligent Developer.
Joined: Jul 02, 2008
The reason I asked for a " " is because the structure of the HTML is such that a blank space (" ") will cause the display to look off so I need something there in its place.
That said, I have experimented but it doesn't appear possible to do what I'm asking, unless you know an answer to the question posed.