Interface Tracker

All Known Implementing Classes:
TrackerImpl

public interface Tracker
Bind tracker to maintain a binding dependency graph. e.g. @{a.b.c, save-onchange:d.e.f} then it forms a dependency from d.e.f to a.b.c for save.
Since:
6.0.0
Author:
henrichen
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addDependsOn(org.zkoss.zk.ui.Component srcComp, String[] srcSeries, Binding srcBinding, org.zkoss.zk.ui.Component dependsOnComp, String[] dependsOnSeries)
    Add a depends-on tracking between the source property name series and depends-on property name series.
    void
    addTracking(org.zkoss.zk.ui.Component comp, String[] series, Binding binding)
    Add a tracking that associate a binding to a dot series under the specified Component
    Returns all direct bindings that associated with the specified property.
    Returns all bindings that associated with the kid bases of specified property.
    getLoadBindings(Object base, String propName)
    Returns all bindings that associated with the specified property.
    void
    removeTrackings(Set<org.zkoss.zk.ui.Component> comps)
    Remove all tracking associated with the specified Component set.
    void
    removeTrackings(org.zkoss.zk.ui.Component comp)
    Remove all tracking associated with the specified Component.
    void
    tieValue(Object comp, Object base, Object script, Object propName, Object value, Object basePath)
    Tie a property to its corresponding value under the specified Component.
  • Method Details

    • addTracking

      void addTracking(org.zkoss.zk.ui.Component comp, String[] series, Binding binding)
      Add a tracking that associate a binding to a dot series under the specified Component
      Parameters:
      comp - the component with the associated binding
      series - the dot series as an array of property name
      binding - the associated binding
    • addDependsOn

      void addDependsOn(org.zkoss.zk.ui.Component srcComp, String[] srcSeries, Binding srcBinding, org.zkoss.zk.ui.Component dependsOnComp, String[] dependsOnSeries)
      Add a depends-on tracking between the source property name series and depends-on property name series.
      Parameters:
      srcComp - the source component with the associated binding
      srcSeries - the dot series as an array of source property name.
      srcBinding - the associated binding
      dependsOnSeries - the dot series as an array of dependsOn property name.
    • removeTrackings

      void removeTrackings(org.zkoss.zk.ui.Component comp)
      Remove all tracking associated with the specified Component.
      Parameters:
      comp - the associated component
    • removeTrackings

      void removeTrackings(Set<org.zkoss.zk.ui.Component> comps)
      Remove all tracking associated with the specified Component set.
      Parameters:
      comps - the associated component set
      Since:
      7.0.2
    • tieValue

      void tieValue(Object comp, Object base, Object script, Object propName, Object value, Object basePath)
      Tie a property to its corresponding value under the specified Component.
      Parameters:
      comp - the associated component
      base - the base object of the property
      script - the field script
      propName - the resolved property name from the field script
      value - the value of the property
      basePath - the basePath script prior to the script field script (Since 8.0)
    • getLoadBindings

      Set<LoadBinding> getLoadBindings(Object base, String propName)
      Returns all bindings that associated with the specified property.
      Parameters:
      base - base object
      propName - property name
      Returns:
      all LoadBindings that associated with the specified property.
    • getDirectLoadBindings

      Set<LoadBinding> getDirectLoadBindings(Object base, String propName)
      Returns all direct bindings that associated with the specified property.
      Parameters:
      base - base object
      propName - property name
      Returns:
      all direct LoadBindings that associated with the specified property.
      Since:
      10.2.0
    • getKidBaseLoadBindings

      Set<LoadBinding> getKidBaseLoadBindings(Object base, String propName)
      Returns all bindings that associated with the kid bases of specified property.
      Parameters:
      base - base object
      propName - property name
      Returns:
      all bindings that associated with the kid bases of specified property.
      Since:
      10.2.0