The xel-config Element"

From Documentation
m
Line 17: Line 17:
 
If your Web server uses another implementation, you can do one of the following:
 
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 <javadoc>org.zkoss.xel.el21.ApacheELFactory</javadoc> class. If the Web server doesn't support Apache JSP 2.1 EL, you have to copy <tt>el-api.jar</tt> (JSP 2.1 API<ref>Required only if you are using the Web server that supports only JSP 2.0.</ref>) and <tt>jasper-el.jar</tt> (Apache's implementation) to your Web application.
+
# If you prefer the implementation based on Apache JSP 2.1 EL, you have to specify the <javadoc>org.zkoss.zkmax.xel.el.ApacheELFactory</javadoc> class. If the Web server doesn't support Apache JSP 2.1 EL, you have to copy <tt>el-api.jar</tt> (JSP 2.1 API<ref>Required only if you are using the Web server that supports only JSP 2.0.</ref>) and <tt>jasper-el.jar</tt> (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 <javadoc>or.zkoss.xel.el.ApacheELFactory</javadoc> class. If the Web server doesn't support Apache Commons EL, you have to copy <tt>commons-el.jar</tt> to your Web application.
+
# If you prefer the implementation based on Apache Commons EL (JSP 2.0 EL), you have to specify the <javadoc>org.zkoss.zkmax.xel.el.ApacheELFactory</javadoc> class. If the Web server doesn't support Apache Commons EL, you have to copy <tt>commons-el.jar</tt> to your Web application.
# If you want a different implementation, you can extend from <javadoc>org.zkoss.xel.el.ELFactory</javadoc> or <javadoc>org.zkoss.xel.el21.ApacheELFactory</javadoc> by simply overriding the <tt>newExpressionEvaluator</tt> method. Of course, if you prefer, you can implement the <javadoc type="interface">org.zkoss.xel.ExpressionFactory</javadoc> interface directly.
+
# If you want a different implementation, you can extend from <javadoc>org.zkoss.xel.el.ELFactory</javadoc> or <javadoc>org.zkoss.zkmax.xel.el.ApacheELFactory</javadoc> by simply overriding the <tt>newExpressionEvaluator</tt> method. Of course, if you prefer, you can implement the <javadoc type="interface">org.zkoss.xel.ExpressionFactory</javadoc> interface directly.
  
  
 
'''Notes'''
 
'''Notes'''
 
<references/>
 
<references/>

Revision as of 07:10, 12 July 2010

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.

If not specified, ZK uses the XEL implementation from ZK Commons EL (zcommons-el.jar), which is a performance-enhanced version of Apache Commons EL.

If your Web server uses another implementation, you can do one of the following:

  1. 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.
  2. 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.
  3. 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

  1. Required only if you are using the Web server that supports only JSP 2.0.