The xel-config Element"
From Documentation
m |
|||
Line 11: | Line 11: | ||
== The evaluator-class Element == | == The evaluator-class Element == | ||
− | + | [Default: <javadoc>org.zkoss.xel.zel.ELFactory</javadoc>] | |
− | [Default: <javadoc>org.zkoss.xel.zel.ELFactory</javadoc> | ||
It specifies the class used to evaluate XEL (Extensible Expression Language) expressions. The specified class must implement the <javadoc type ="interface">org.zkoss.xel.ExpressionFactory</javadoc> interface. | It specifies the class used to evaluate XEL (Extensible Expression Language) expressions. The specified class must implement the <javadoc type ="interface">org.zkoss.xel.ExpressionFactory</javadoc> interface. | ||
− | |||
− | |||
Since ZK 6, if not specified, ZK uses the new XEL implementation from the ZK EL Library (i.e., <tt>zel.jar</tt>), which supports new features seen in <i>Unified Expression Language 2.2</i> such as method calls and l-value. If ZK cannot find the <tt>zel.jar</tt> in your class-path, ZK will degrade to use the original ZK Commons EL(<tt>zcommons-el.jar</tt>). | Since ZK 6, if not specified, ZK uses the new XEL implementation from the ZK EL Library (i.e., <tt>zel.jar</tt>), which supports new features seen in <i>Unified Expression Language 2.2</i> such as method calls and l-value. If ZK cannot find the <tt>zel.jar</tt> in your class-path, ZK will degrade to use the original ZK Commons EL(<tt>zcommons-el.jar</tt>). |
Revision as of 10:19, 27 February 2012
The allowed child elements include evaluator-class. At most one xel-config element is allowed for each zk.xml.
<xel-config>
<evaluator-class>my.MyExpressionFactory</evaluator-class>
</xel-config>
The evaluator-class Element
[Default: ELFactory]
It specifies the class used to evaluate XEL (Extensible Expression Language) expressions. The specified class must implement the ExpressionFactory interface.
Since ZK 6, if not specified, ZK uses the new XEL implementation from the ZK EL Library (i.e., zel.jar), which supports new features seen in Unified Expression Language 2.2 such as method calls and l-value. If ZK cannot find the zel.jar in your class-path, ZK will degrade to use the original ZK Commons EL(zcommons-el.jar).
If your Web server uses another implementation, you can do one of the following:
- If you prefer the implementation based on Apache JSP 2.1 EL, you have to specify the ApacheELFactory class. If the Web server doesn't support Apache JSP 2.1 EL, you have to copy el-api.jar (JSP 2.1 API[1]) and jasper-el.jar (Apache's implementation) to your Web application.
- If you prefer the implementation based on Apache Commons EL (JSP 2.0 EL), you have to specify the ApacheELFactory class. If the Web server doesn't support Apache Commons EL, you have to copy commons-el.jar to your Web application.
- If you want a different implementation, you can extend from ELFactory or ApacheELFactory by simply overriding the newExpressionEvaluator method. Of course, if you prefer, you can implement the ExpressionFactory interface directly.
Notes
- ↑ Required only if you are using the Web server that supports only JSP 2.0.
Version History
Version | Date | Content |
---|---|---|
6.0.0 | Sep. 2011 | Support those new features seen in Unified Expression Language 2.2 such as method calls and l-value. |