Class AnnotateBinder

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

public class AnnotateBinder extends BinderImpl
ZK Annotated Binder, it parse the component annotation and handles the binding of components and view model.
Since:
6.0.0
Author:
henrichen, dennischen
See Also:
  • Constructor Details

    • AnnotateBinder

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

      public AnnotateBinder(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)
      Initializes the binder with a root component and viewModel object. You should never call this if you use AnnotateBinder and zk annotation since 6.0.2, this method will take care of super's Binder.init(Component, Object, Map) only
      If AnnotateBinder need to be used manually, initAnnotatedBindings() need to be invoked for scanning and building binding syntax tree.
      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
      See Also:
    • initAnnotatedBindings

      public void initAnnotatedBindings()
      This method will parse Zul component's annotation that user declared and call Binder's addBindings series methods to initiate binder's internal binding syntax trees, which then will cooperate with context(for look up variables) and be used by Binder's EL engine while BinderImpl.loadComponent(Component, boolean) or Command been triggered.
      Since:
      6.0.2
    • createViewModelProxyIfEnabled

      public Object createViewModelProxyIfEnabled(Object viewModel)
      Internal use only