Package org.zkoss.clientbind
Class ClientBinderResolver
- java.lang.Object
-
- org.zkoss.zk.xel.impl.SimpleEvaluator
-
- org.zkoss.bind.impl.BindEvaluatorXImpl
-
- org.zkoss.clientbind.ClientBinderResolver
-
- All Implemented Interfaces:
java.io.Serializable
,BindEvaluatorX
,Evaluator
public class ClientBinderResolver extends BindEvaluatorXImpl implements BindEvaluatorX
A EL resolver for client binder to resolve oid to Bean and uuid to Component, if possible.- Author:
- jumperchen
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ClientBinderResolver(Component view, BindEvaluatorX bindEvaluatorX)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
evaluate(Component comp, Expression expression)
Evaluates the expression.java.lang.Object
evaluate(Page page, Expression expression)
Evaluates the expression.java.lang.Class<?>
getType(BindContext ctx, Component comp, ExpressionX expression)
Returns the result type of the specified expression.java.lang.Object
getValue(BindContext ctx, Component comp, ExpressionX expression)
Sets the specified value to the property resolved from the specified expression.ValueReference
getValueReference(BindContext ctx, Component comp, ExpressionX expression)
Returns the result reference of the specified expression.boolean
isReadOnly(BindContext ctx, Component comp, ExpressionX expression)
Returns whether the specified expression a read only expression.protected XelContext
newXelContext(BindContext ctx, Component comp)
Expression
parseExpression(java.lang.String expression, java.lang.Class expectedType)
Prepares the expression.ExpressionX
parseExpressionX(BindContext ctx, java.lang.String expression, java.lang.Class<?> expectedType)
Prepares the expressionX.void
setValue(BindContext ctx, Component comp, ExpressionX expression, java.lang.Object value)
Sets the specified value to the property resolved from the specified expression.-
Methods inherited from class org.zkoss.zk.xel.impl.SimpleEvaluator
getExpressionFactory, getExpressionFactoryClass, getFunctionMapper, getVariableResolver, newXelContext
-
-
-
-
Constructor Detail
-
ClientBinderResolver
public ClientBinderResolver(Component view, BindEvaluatorX bindEvaluatorX)
-
-
Method Detail
-
parseExpression
public Expression parseExpression(java.lang.String expression, java.lang.Class expectedType) throws XelException
Description copied from interface:Evaluator
Prepares the expression.- Specified by:
parseExpression
in interfaceEvaluator
- Overrides:
parseExpression
in classSimpleEvaluator
- Parameters:
expression
- the expression to be prepared for being evaluated later.expectedType
- the expected type of the result of the evaluation- Throws:
XelException
-
evaluate
public java.lang.Object evaluate(Page page, Expression expression) throws XelException
Description copied from interface:Evaluator
Evaluates the expression.- Specified by:
evaluate
in interfaceEvaluator
- Overrides:
evaluate
in classSimpleEvaluator
- Parameters:
page
- the page, or null to ignore- Throws:
XelException
-
evaluate
public java.lang.Object evaluate(Component comp, Expression expression) throws XelException
Description copied from interface:Evaluator
Evaluates the expression.- Specified by:
evaluate
in interfaceEvaluator
- Overrides:
evaluate
in classSimpleEvaluator
- Parameters:
comp
- the component, or null to ignore- Throws:
XelException
-
parseExpressionX
public ExpressionX parseExpressionX(BindContext ctx, java.lang.String expression, java.lang.Class<?> expectedType) throws XelException
Description copied from interface:BindEvaluatorX
Prepares the expressionX.- Specified by:
parseExpressionX
in interfaceBindEvaluatorX
- Overrides:
parseExpressionX
in classBindEvaluatorXImpl
expression
- the expression to be prepared for being evaluated later.expectedType
- the expected type of the result of the evaluation- Throws:
XelException
-
setValue
public void setValue(BindContext ctx, Component comp, ExpressionX expression, java.lang.Object value) throws XelException
Description copied from interface:BindEvaluatorX
Sets the specified value to the property resolved from the specified expression.- Specified by:
setValue
in interfaceBindEvaluatorX
- Overrides:
setValue
in classBindEvaluatorXImpl
- Parameters:
ctx
- the scoped bind context of this operationcomp
- the scoped component context of this operationexpression
- the expression that will resolve a propertyvalue
- the value to be set into the resolved property- Throws:
XelException
-
getValue
public java.lang.Object getValue(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorX
Sets the specified value to the property resolved from the specified expression.- Specified by:
getValue
in interfaceBindEvaluatorX
- Overrides:
getValue
in classBindEvaluatorXImpl
- Parameters:
ctx
- the scoped bind context of this operationcomp
- the scoped component context of this operationexpression
- the expression that will resolve a property- Throws:
XelException
-
getType
public java.lang.Class<?> getType(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorX
Returns the result type of the specified expression.- Specified by:
getType
in interfaceBindEvaluatorX
- Overrides:
getType
in classBindEvaluatorXImpl
- Parameters:
ctx
- BindContextcomp
- evaluation contextexpression
- the expression that will resolve a property- Throws:
XelException
-
getValueReference
public ValueReference getValueReference(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorX
Returns the result reference of the specified expression.- Specified by:
getValueReference
in interfaceBindEvaluatorX
- Overrides:
getValueReference
in classBindEvaluatorXImpl
- Parameters:
ctx
- BindContextcomp
- evaluation contextexpression
- the expression that will resolve a property- Throws:
XelException
-
isReadOnly
public boolean isReadOnly(BindContext ctx, Component comp, ExpressionX expression) throws XelException
Description copied from interface:BindEvaluatorX
Returns whether the specified expression a read only expression.- Specified by:
isReadOnly
in interfaceBindEvaluatorX
- Overrides:
isReadOnly
in classBindEvaluatorXImpl
- Parameters:
ctx
- BindContextcomp
- evaluation contextexpression
- the expression that will resolve a property- Returns:
- whether the specified expression a read only expression.
- Throws:
XelException
-
newXelContext
protected XelContext newXelContext(BindContext ctx, Component comp)
- Overrides:
newXelContext
in classBindEvaluatorXImpl
-
-