0

@composer in EL expressions

asked 2014-06-14 10:43:16 +0800

idosil gravatar image idosil
1

Hi, there. I'm new to ZK. I'd like to know whether it is possible to use @composer inside EL expressions of the sort: <label value="${composer.property == 1 ? 'its a 1' : 'its not a 1'}"/>

Cheers!

delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
1
link publish delete flag offensive edit
0

answered 2014-06-16 09:10:59 +0800

idiazt gravatar image idiazt
0

I think the answer has more to do with JSTL than ZK. In JSTL autoboxing works like this with comparations:

null                   null value.               -
123                    int value.                java.lang.Long
123.00                 real value.               java.lang.Double
"string" ou 'string'   string.                   java.lang.String
true or false          boolean.                  java.lang.Boolean

So, if your property is an Integer, comparison will be always false, since new Long(1) is never equals to Integer(1).

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-06-14 10:43:16 +0800

Seen: 22 times

Last updated: Jun 16 '14

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More