Class BindELContext

java.lang.Object
org.zkoss.zel.ELContext
org.zkoss.xel.zel.XelELContext
org.zkoss.bind.xel.zel.BindELContext

public class BindELContext extends org.zkoss.xel.zel.XelELContext
ELContext for Binding.
Since:
6.0.0
Author:
henrichen
  • Constructor Details

    • BindELContext

      public BindELContext(org.zkoss.xel.XelContext xelc)
  • Method Details

    • newELResolver

      protected org.zkoss.zel.ELResolver newELResolver(org.zkoss.xel.XelContext xelc)
      Overrides:
      newELResolver in class org.zkoss.xel.zel.XelELContext
    • getBinding

      public Binding getBinding()
    • getBindContext

      public BindContext getBindContext()
    • ignoreTracker

      public boolean ignoreTracker()
    • getAttribute

      public Object getAttribute(String name)
    • setAttribute

      public Object setAttribute(String name, Object value)
    • removeAttribute

      public Object removeAttribute(String name)
      Removes the attribute, if any.
      Since:
      8.0.0
    • prepareProperty

      public static Property prepareProperty(Object base, String prop, Object value, BindContext ctx)
    • getNotifys

      public static Set<Property> getNotifys(Method m, Object base, String prop, Object value, BindContext ctx)
    • getNotifys

      public static Set<Property> getNotifys(BindContext ctx)
    • addNotifys

      public static void addNotifys(Object base, String prop, Object value, BindContext ctx)
    • addNotifys

      public static void addNotifys(Method m, Object base, String prop, Object value, BindContext ctx)
    • addNotifys

      public static void addNotifys(Set<Property> props, BindContext ctx)
    • toNodeString

      public static String toNodeString(org.zkoss.zel.impl.parser.Node next, StringBuilder path)
    • toNodeString

      public static String toNodeString(org.zkoss.zel.impl.parser.Node next, StringBuffer path)
    • isBracket

      public static boolean isBracket(String script)
    • appendFields

      public static String appendFields(String prefix, String field)
    • addDependsOnTrackings

      public static void addDependsOnTrackings(Method m, String basepath, List<String> srcpath, Binding binding, BindContext ctx)
    • pathToString

      public static String pathToString(List<String> path)
    • addDependsOnTracking

      public static void addDependsOnTracking(Binding srcBinding, List<String> srcPath, String dependsOnBasepath, 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, List<String> srcPath, org.zkoss.zk.ui.Component srcComp, String dependsOnPath, org.zkoss.zk.ui.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(Object value)
      Returns whether the specified Object is an immutable object
    • getModelName

      public static String getModelName(org.zkoss.zk.ui.Component comp)
    • addModel

      public static void addModel(org.zkoss.zk.ui.Component comp, Object model)
    • removeModel

      public static Object removeModel(org.zkoss.zk.ui.Component comp)
    • putContext

      public void putContext(Class key, Object contextObject)
      Overrides:
      putContext in class org.zkoss.zel.ELContext