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:
Serializable,BindEvaluatorX,Evaluator
A EL resolver for client binder to resolve oid to Bean and uuid to Component, if
possible.
- Author:
- jumperchen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionevaluate(Component comp, Expression expression) Evaluates the expression.evaluate(Page page, Expression expression) Evaluates the expression.Class<?>getType(BindContext ctx, Component comp, ExpressionX expression) Returns the result type of the specified expression.getValue(BindContext ctx, Component comp, ExpressionX expression) Sets the specified value to the property resolved from the specified expression.getValueReference(BindContext ctx, Component comp, ExpressionX expression) Returns the result reference of the specified expression.booleanisReadOnly(BindContext ctx, Component comp, ExpressionX expression) Returns whether the specified expression a read only expression.protected XelContextnewXelContext(BindContext ctx, Component comp) parseExpression(String expression, Class expectedType) Prepares the expression.parseExpressionX(BindContext ctx, String expression, Class<?> expectedType) Prepares the expressionX.voidsetValue(BindContext ctx, Component comp, ExpressionX expression, 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 Details
-
ClientBinderResolver
-
-
Method Details
-
parseExpression
Description copied from interface:EvaluatorPrepares the expression.- Specified by:
parseExpressionin interfaceEvaluator- Overrides:
parseExpressionin 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
Description copied from interface:EvaluatorEvaluates the expression.- Specified by:
evaluatein interfaceEvaluator- Overrides:
evaluatein classSimpleEvaluator- Parameters:
page- the page, or null to ignore- Throws:
XelException
-
evaluate
Description copied from interface:EvaluatorEvaluates the expression.- Specified by:
evaluatein interfaceEvaluator- Overrides:
evaluatein classSimpleEvaluator- Parameters:
comp- the component, or null to ignore- Throws:
XelException
-
parseExpressionX
public ExpressionX parseExpressionX(BindContext ctx, String expression, Class<?> expectedType) throws XelException Description copied from interface:BindEvaluatorXPrepares the expressionX.- Specified by:
parseExpressionXin interfaceBindEvaluatorX- Overrides:
parseExpressionXin classBindEvaluatorXImplexpression- 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, Object value) throws XelException Description copied from interface:BindEvaluatorXSets the specified value to the property resolved from the specified expression.- Specified by:
setValuein interfaceBindEvaluatorX- Overrides:
setValuein 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
Description copied from interface:BindEvaluatorXSets the specified value to the property resolved from the specified expression.- Specified by:
getValuein interfaceBindEvaluatorX- Overrides:
getValuein 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 Class<?> getType(BindContext ctx, Component comp, ExpressionX expression) throws XelException Description copied from interface:BindEvaluatorXReturns the result type of the specified expression.- Specified by:
getTypein interfaceBindEvaluatorX- Overrides:
getTypein 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:BindEvaluatorXReturns the result reference of the specified expression.- Specified by:
getValueReferencein interfaceBindEvaluatorX- Overrides:
getValueReferencein 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:BindEvaluatorXReturns whether the specified expression a read only expression.- Specified by:
isReadOnlyin interfaceBindEvaluatorX- Overrides:
isReadOnlyin 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
- Overrides:
newXelContextin classBindEvaluatorXImpl
-