Class DefaultBinder

java.lang.Object
org.zkoss.bind.impl.BinderImpl
org.zkoss.bind.DefaultBinder
All Implemented Interfaces:
Serializable, Binder, BinderCtrl

public class DefaultBinder extends BinderImpl
ZK default Binder, use this class if you want to new a binder and control components though Binder API.
After new a instance, you have to call init(Component, Object, Map) first, then call BinderImpl.addCommandBinding(Component, String, String, java.util.Map), BinderImpl.addPropertyLoadBindings(Component, String, String, String[], String[], java.util.Map, String, java.util.Map) ...etc to assign the binding.
After all the add binding done, you have to call BinderImpl.loadComponent(Component, boolean) to trigger first loading of the binding.
Since:
6.0.0
Author:
dennischen
See Also:
  • Constructor Details

    • DefaultBinder

      public DefaultBinder()
      new a binder with default event queue name and scope
    • DefaultBinder

      public DefaultBinder(String qname, String qscope)
      new a binder with event queue name and scope
      Parameters:
      qname - event queue name
      qscope - event queue scope, see EventQueues
  • Method Details

    • init

      public void init(org.zkoss.zk.ui.Component comp, Object vm, Map<String,Object> initArgs)
      Description copied from interface: Binder
      Initializes the binder with a root component and viewModel object. You should never call this if you use AnnotateBinder and zk annotation
      Specified by:
      init in interface Binder
      Overrides:
      init in class BinderImpl
      Parameters:
      comp - root component of binder
      vm - viewModel object
      initArgs - args key-value pairs for initial, nullable