Interface BindEvaluatorX

  • All Superinterfaces:
    org.zkoss.zk.xel.Evaluator, java.io.Serializable
    All Known Implementing Classes:
    BindEvaluatorXImpl

    public interface BindEvaluatorX
    extends org.zkoss.zk.xel.Evaluator
    An extension of Evaluator to have more control to handle Binding via EL.

    With BindEvaluatorX, you are allow to parse a Method expression or set value into property resolved by the provided expression.

    Since:
    6.0.0
    Author:
    henrichen
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.lang.Class<?> getType​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Returns the result type of the specified expression.
      java.lang.Object getValue​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Sets the specified value to the property resolved from the specified expression.
      org.zkoss.xel.ValueReference getValueReference​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Returns the result reference of the specified expression.
      boolean isReadOnly​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression)
      Returns whether the specified expression a read only expression.
      org.zkoss.xel.ExpressionX parseExpressionX​(BindContext ctx, java.lang.String expression, java.lang.Class<?> expectedType)
      Prepares the expressionX.
      void setValue​(BindContext ctx, org.zkoss.zk.ui.Component comp, org.zkoss.xel.ExpressionX expression, java.lang.Object value)
      Sets the specified value to the property resolved from the specified expression.
      • Methods inherited from interface org.zkoss.zk.xel.Evaluator

        evaluate, evaluate, parseExpression
    • Method Detail

      • parseExpressionX

        org.zkoss.xel.ExpressionX parseExpressionX​(BindContext ctx,
                                                   java.lang.String expression,
                                                   java.lang.Class<?> expectedType)
                                            throws org.zkoss.xel.XelException
        Prepares the expressionX.
        Parameters:
        expression - the expression to be prepared for being evaluated later.
        expectedType - the expected type of the result of the evaluation
        Throws:
        org.zkoss.xel.XelException
      • setValue

        void setValue​(BindContext ctx,
                      org.zkoss.zk.ui.Component comp,
                      org.zkoss.xel.ExpressionX expression,
                      java.lang.Object value)
               throws org.zkoss.xel.XelException
        Sets the specified value to the property resolved from the specified expression.
        Parameters:
        ctx - the scoped bind context of this operation
        comp - the scoped component context of this operation
        expression - the expression that will resolve a property
        value - the value to be set into the resolved property
        Throws:
        org.zkoss.xel.XelException
      • getValue

        java.lang.Object getValue​(BindContext ctx,
                                  org.zkoss.zk.ui.Component comp,
                                  org.zkoss.xel.ExpressionX expression)
                           throws org.zkoss.xel.XelException
        Sets the specified value to the property resolved from the specified expression.
        Parameters:
        ctx - the scoped bind context of this operation
        comp - the scoped component context of this operation
        expression - the expression that will resolve a property
        Throws:
        org.zkoss.xel.XelException
      • getType

        java.lang.Class<?> getType​(BindContext ctx,
                                   org.zkoss.zk.ui.Component comp,
                                   org.zkoss.xel.ExpressionX expression)
                            throws org.zkoss.xel.XelException
        Returns the result type of the specified expression.
        Parameters:
        ctx - BindContext
        comp - evaluation context
        expression - the expression that will resolve a property
        Throws:
        org.zkoss.xel.XelException
      • getValueReference

        org.zkoss.xel.ValueReference getValueReference​(BindContext ctx,
                                                       org.zkoss.zk.ui.Component comp,
                                                       org.zkoss.xel.ExpressionX expression)
                                                throws org.zkoss.xel.XelException
        Returns the result reference of the specified expression.
        Parameters:
        ctx - BindContext
        comp - evaluation context
        expression - the expression that will resolve a property
        Throws:
        org.zkoss.xel.XelException
      • isReadOnly

        boolean isReadOnly​(BindContext ctx,
                           org.zkoss.zk.ui.Component comp,
                           org.zkoss.xel.ExpressionX expression)
                    throws org.zkoss.xel.XelException
        Returns whether the specified expression a read only expression.
        Parameters:
        ctx - BindContext
        comp - evaluation context
        expression - the expression that will resolve a property
        Returns:
        whether the specified expression a read only expression.
        Throws:
        org.zkoss.xel.XelException