A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Java
»
JSF
Author
EL-rendering of if-then-else
nimo frey
Ranch Hand
Joined: Jun 28, 2008
Posts: 580
posted
Feb 13, 2009 04:07:27
0
I want to use this expresion:
This works:
<h:outputLabel value="hello" title="#{a.name eq 'Eve' ? a.name : 'no name'}"/>
But this does not work, as the
String
within the expression ' today' cannot be resolved:
<h:outputLabel value="hello" title="#{a.name eq 'Eve' ? a.name 'today' : 'no name'}"/>
How can I express that?
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
Feb 13, 2009 06:27:04
0
Use JSTL fn:join to concat strings in EL or use two separate expressions.
Code depot of a Java EE / JSF developer
|
JSF / Eclipse / Tomcat kickoff tutorial
|
DAO kickoff tutorial
|
I ♥ Unicode
nimo frey
Ranch Hand
Joined: Jun 28, 2008
Posts: 580
posted
Feb 13, 2009 07:09:00
0
thanks:-)
Bauke Scholtz
Ranch Hand
Joined: Oct 08, 2006
Posts: 2458
posted
Feb 13, 2009 07:10:59
0
You're welcome.
I agree. Here's the link:
http://zeroturnaround.com/jrebel
- it saves me about five hours per week
subject: EL-rendering of if-then-else
Similar Threads
Bean value doubt
On combo selection, components visibility need to change
Richfaces scrollableDataTable
closing tag > as value?
redirect url
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter