Package org.zkoss.zk.xel.impl
Class ExecutionResolver
java.lang.Object
org.zkoss.zk.xel.impl.ExecutionResolver
- All Implemented Interfaces:
VariableResolver,VariableResolverX
A variable resolver that is based on the specified execution.
- Since:
- 3.0.0
- Author:
- tomyeh
-
Constructor Summary
ConstructorsConstructorDescriptionExecutionResolver(Execution exec, VariableResolver parent) Constructs a resolver with a parent and a page. -
Method Summary
Modifier and TypeMethodDescriptiongetSelf()Returns the self variable.resolveVariable(String name) Resolves the specified variable.resolveVariable(XelContext ctx, Object base, Object onm) Resolves the the given variable on the given base object.protected ObjectresolveVariable0(Object self, XelContext ctx, Object base, Object onm) voidSets the self variable.toString()
-
Constructor Details
-
ExecutionResolver
Constructs a resolver with a parent and a page.- Parameters:
parent- the parent resolver (null means ignored).exec- the current execution
-
-
Method Details
-
setSelf
Sets the self variable. The self variable also acts as the context to resolve other variables. -
getSelf
Returns the self variable. -
resolveVariable
Description copied from interface:VariableResolverResolves the specified variable.- Specified by:
resolveVariablein interfaceVariableResolver- Parameters:
name- the name of the variable to resolve- Throws:
XelException
-
resolveVariable
Description copied from interface:VariableResolverXResolves the the given variable on the given base object.It resolves not only top-level variables but also properties. For example, when resolving
foo.duke,resolveVariable(ctx, null, "foo")is called first. And if it returns an non-null object,resolveVariable(ctx, foo, "duke")is called then (where we assume the returned object in the previous call isfoo).- Specified by:
resolveVariablein interfaceVariableResolverX- Parameters:
ctx- the context of this evaluationbase- the base object whose property value is to be returned, or null to resolve a top-level variable.onm- the name of the variable (or property) to resolve
-
resolveVariable0
-
toString
-