EL Expressions"
From Documentation
(Created page with '{{ZKDevelopersReferencePageHeader}} =Version History= {{LastUpdated}} {| border='1px' | width="100%" ! Version !! Date !! Content |- | | | |} {{ZKDeveloper…') |
|||
Line 1: | Line 1: | ||
{{ZKDevelopersReferencePageHeader}} | {{ZKDevelopersReferencePageHeader}} | ||
+ | |||
+ | An EL expressions is an expression enclosed with <tt>${</tt> and <tt>}</tt>, i.e., the syntax is <tt>${expr}</tt>. For example, | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <element attr1="${bean.property}".../> | ||
+ | ${map[entry]} | ||
+ | <another-element>${3+counter} is ${empty map}</another-element> | ||
+ | </source> | ||
+ | |||
+ | When an EL expression is used as an attribute value, it could return any kind of objects as long as the attribute allows. For example, the following expressions will be evaluated to <tt>boolean</tt> and <tt>int</tt>, respectively. | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <window if="${some > 10}"><!-- boolean --> | ||
+ | <progressmetter value="${progress}"/><!-- integer --> | ||
+ | </source> | ||
+ | |||
+ | If the class does not match, ZK Loader will try to coerce it to the correct one. If failed, an exception is thrown. | ||
=Version History= | =Version History= |
Revision as of 11:17, 24 November 2010
An EL expressions is an expression enclosed with ${ and }, i.e., the syntax is ${expr}. For example,
<element attr1="${bean.property}".../>
${map[entry]}
<another-element>${3+counter} is ${empty map}</another-element>
When an EL expression is used as an attribute value, it could return any kind of objects as long as the attribute allows. For example, the following expressions will be evaluated to boolean and int, respectively.
<window if="${some > 10}"><!-- boolean -->
<progressmetter value="${progress}"/><!-- integer -->
If the class does not match, ZK Loader will try to coerce it to the correct one. If failed, an exception is thrown.
Version History
Version | Date | Content |
---|---|---|