Class OGNLFactory

  • All Implemented Interfaces:
    org.zkoss.xel.ExpressionFactory

    public class OGNLFactory
    extends java.lang.Object
    implements org.zkoss.xel.ExpressionFactory
    An implementation based on OGNL.

    Available in ZK EE

    Note: OGNL is not completely compatible with JSP EL.

    See also OGNL website.

    Since:
    3.0.0
    Author:
    tomyeh
    • Field Summary

      • Fields inherited from interface org.zkoss.xel.ExpressionFactory

        FEATURE_CLASS, FEATURE_FUNCTION
    • Constructor Summary

      Constructors 
      Constructor Description
      OGNLFactory()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object evaluate​(org.zkoss.xel.XelContext ctx, java.lang.String expression, java.lang.Class expectedType)  
      static java.util.Map getContext​(org.zkoss.xel.XelContext ctx)
      Returns an OGNL context for the specified XEL context.
      static java.lang.Object getRoot​(org.zkoss.xel.XelContext ctx)
      Returns the root object.
      boolean isSupported​(int feature)  
      org.zkoss.xel.Expression parseExpression​(org.zkoss.xel.XelContext ctx, java.lang.String expression, java.lang.Class expectedType)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OGNLFactory

        public OGNLFactory()
    • Method Detail

      • isSupported

        public boolean isSupported​(int feature)
        Specified by:
        isSupported in interface org.zkoss.xel.ExpressionFactory
      • parseExpression

        public org.zkoss.xel.Expression parseExpression​(org.zkoss.xel.XelContext ctx,
                                                        java.lang.String expression,
                                                        java.lang.Class expectedType)
                                                 throws org.zkoss.xel.XelException
        Specified by:
        parseExpression in interface org.zkoss.xel.ExpressionFactory
        Throws:
        org.zkoss.xel.XelException
      • evaluate

        public java.lang.Object evaluate​(org.zkoss.xel.XelContext ctx,
                                         java.lang.String expression,
                                         java.lang.Class expectedType)
                                  throws org.zkoss.xel.XelException
        Specified by:
        evaluate in interface org.zkoss.xel.ExpressionFactory
        Throws:
        org.zkoss.xel.XelException
      • getContext

        public static java.util.Map getContext​(org.zkoss.xel.XelContext ctx)
        Returns an OGNL context for the specified XEL context.
      • getRoot

        public static java.lang.Object getRoot​(org.zkoss.xel.XelContext ctx)
        Returns the root object.