Package org.zkoss.bind.xel.zel
Class BindELContext
- java.lang.Object
-
- org.zkoss.zel.ELContext
-
- org.zkoss.xel.zel.XelELContext
-
- org.zkoss.bind.xel.zel.BindELContext
-
- Direct Known Subclasses:
BindELContextEx
public class BindELContext extends XelELContext
ELContext for Binding.- Since:
- 6.0.0
- Author:
- henrichen
-
-
Constructor Summary
Constructors Constructor Description BindELContext(XelContext xelc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
addDependsOnTracking(Binding srcBinding, java.util.List<java.lang.String> srcPath, java.lang.String dependsOnBasepath, java.lang.String dependsOnProp)
Prepare the dependsOn nodesstatic void
addDependsOnTracking(Binding srcBinding, java.util.List<java.lang.String> srcPath, Component srcComp, java.lang.String dependsOnPath, Component dependsOnComp)
Prepare the dependsOn nodesstatic void
addDependsOnTrackings(java.lang.reflect.Method m, java.lang.String basepath, java.util.List<java.lang.String> srcpath, Binding binding, BindContext ctx)
static void
addModel(Component comp, java.lang.Object model)
static void
addNotifys(java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
static void
addNotifys(java.lang.reflect.Method m, java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
static void
addNotifys(java.util.Set<Property> props, BindContext ctx)
static java.lang.String
appendFields(java.lang.String prefix, java.lang.String field)
java.lang.Object
getAttribute(java.lang.String name)
BindContext
getBindContext()
Binding
getBinding()
static java.lang.String
getModelName(Component comp)
static java.util.Set<Property>
getNotifys(java.lang.reflect.Method m, java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
static java.util.Set<Property>
getNotifys(BindContext ctx)
boolean
ignoreTracker()
static boolean
isBracket(java.lang.String script)
static boolean
isImmutable(java.lang.Object value)
Returns whether the specified Object is an immutable objectprotected ELResolver
newELResolver(XelContext xelc)
static java.lang.String
pathToString(java.util.List<java.lang.String> path)
static Property
prepareProperty(java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
void
putContext(java.lang.Class key, java.lang.Object contextObject)
Add an object to this EL context under the given key.java.lang.Object
removeAttribute(java.lang.String name)
Removes the attribute, if any.static java.lang.Object
removeModel(Component comp)
java.lang.Object
setAttribute(java.lang.String name, java.lang.Object value)
static java.lang.String
toNodeString(Node next, java.lang.StringBuffer path)
static java.lang.String
toNodeString(Node next, java.lang.StringBuilder path)
-
Methods inherited from class org.zkoss.xel.zel.XelELContext
getELResolver, getFunctionMapper, getVariableMapper, getXelContext
-
Methods inherited from class org.zkoss.zel.ELContext
addEvaluationListener, convertToType, enterLambdaScope, exitLambdaScope, getContext, getEvaluationListeners, getImportHandler, getLambdaArgument, getLocale, isLambdaArgument, isPropertyResolved, notifyAfterEvaluation, notifyBeforeEvaluation, notifyPropertyResolved, setLocale, setPropertyResolved, setPropertyResolved
-
-
-
-
Constructor Detail
-
BindELContext
public BindELContext(XelContext xelc)
-
-
Method Detail
-
newELResolver
protected ELResolver newELResolver(XelContext xelc)
- Overrides:
newELResolver
in classXelELContext
-
getBinding
public Binding getBinding()
-
getBindContext
public BindContext getBindContext()
-
ignoreTracker
public boolean ignoreTracker()
-
getAttribute
public java.lang.Object getAttribute(java.lang.String name)
-
setAttribute
public java.lang.Object setAttribute(java.lang.String name, java.lang.Object value)
-
removeAttribute
public java.lang.Object removeAttribute(java.lang.String name)
Removes the attribute, if any.- Since:
- 8.0.0
-
prepareProperty
public static Property prepareProperty(java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
-
getNotifys
public static java.util.Set<Property> getNotifys(java.lang.reflect.Method m, java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
-
getNotifys
public static java.util.Set<Property> getNotifys(BindContext ctx)
-
addNotifys
public static void addNotifys(java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
-
addNotifys
public static void addNotifys(java.lang.reflect.Method m, java.lang.Object base, java.lang.String prop, java.lang.Object value, BindContext ctx)
-
addNotifys
public static void addNotifys(java.util.Set<Property> props, BindContext ctx)
-
toNodeString
public static java.lang.String toNodeString(Node next, java.lang.StringBuilder path)
-
toNodeString
public static java.lang.String toNodeString(Node next, java.lang.StringBuffer path)
-
isBracket
public static boolean isBracket(java.lang.String script)
-
appendFields
public static java.lang.String appendFields(java.lang.String prefix, java.lang.String field)
-
addDependsOnTrackings
public static void addDependsOnTrackings(java.lang.reflect.Method m, java.lang.String basepath, java.util.List<java.lang.String> srcpath, Binding binding, BindContext ctx)
-
pathToString
public static java.lang.String pathToString(java.util.List<java.lang.String> path)
-
addDependsOnTracking
public static void addDependsOnTracking(Binding srcBinding, java.util.List<java.lang.String> srcPath, java.lang.String dependsOnBasepath, java.lang.String dependsOnProp)
Prepare the dependsOn nodes- Parameters:
srcBinding
- associated binding of the source dependent field; e.g.srcPath
- the source dependent field name series in list. e.g. "vm", "fullname" for "vm.fullname".dependsOnBasepath
- the base path for the depends-on field; e.g. the "vm" of the "vm.firstname"dependsOnProp
- the property name of the depends-on field; e.g. the "firstname" of the "vm.firstname"
-
addDependsOnTracking
public static void addDependsOnTracking(Binding srcBinding, java.util.List<java.lang.String> srcPath, Component srcComp, java.lang.String dependsOnPath, Component dependsOnComp)
Prepare the dependsOn nodes- Parameters:
srcBinding
- the binding with the source dependent field; e.g.srcPath
- the source dependent field name series in list; e.g. ["vm", "fullname"] for "vm.fullname".srcComp
- the source component associated with the binding; e.g.dependsOnPath
- the depends-on property name series; e.g. "vm.firstname"dependsOnComp
- the depends-on component associated with the depends-on property name series binding; e.g. "vm.firstname"
-
isImmutable
public static boolean isImmutable(java.lang.Object value)
Returns whether the specified Object is an immutable object
-
getModelName
public static java.lang.String getModelName(Component comp)
-
addModel
public static void addModel(Component comp, java.lang.Object model)
-
removeModel
public static java.lang.Object removeModel(Component comp)
-
putContext
public void putContext(java.lang.Class key, java.lang.Object contextObject)
Description copied from class:ELContext
Add an object to this EL context under the given key.- Overrides:
putContext
in classELContext
- Parameters:
key
- The key under which to store the objectcontextObject
- The object to add
-
-