Package org.zkoss.bind
Class AnnotateBinder
- java.lang.Object
-
- org.zkoss.bind.impl.BinderImpl
-
- org.zkoss.bind.AnnotateBinder
-
- All Implemented Interfaces:
java.io.Serializable
,Binder
,BinderCtrl
- Direct Known Subclasses:
AnnotateBinderEx
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:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.bind.impl.BinderImpl
DISABLE_METHOD_CACHE, ZKFORMPROXYNOTIFIEDKEY
-
Fields inherited from interface org.zkoss.bind.Binder
ACCESS, COMMAND_FAIL_VALIDATE, COMMAND_SUCCESS, CONVERTER, LOAD_EVENT, LOAD_REPLACEMENT, LOAD_TYPE, RENDERER, SAVE_EVENT, SAVE_REPLACEMENT, VALIDATOR, ZKBIND
-
Fields inherited from interface org.zkoss.bind.sys.BinderCtrl
ACTIVATOR, BINDCTX, BINDER, BINDING, BINDRENDERING, CHILDREN_ATTR, CHILDREN_BINDING_MODEL, CHILDREN_BINDING_MODEL_LISTENER, CHILDREN_BINDING_RENDERED_COMPONENTS, CLIENT_INFO, CLIENT_UPLOAD_INFO, DEFAULT_QUEUE_NAME, DEFAULT_QUEUE_SCOPE, DEPENDS_ON_COMP, FORM_ID, IGNORE_REF_VALUE, IGNORE_TRACKER, INVALIDATE_REF_VALUE, IS_TEMPLATE_MODEL_ENABLED_ATTR, LOAD_FORM_COMPONENT, LOAD_FORM_EXPRESSION, MATCHMEDIAVALUE_PREFIX, MODEL, NOTIFYS, ON_BIND_CLEAN, ON_BIND_INIT, PHASE_LISTENER_CLASS_KEY, REMOVE_BINDINGS, RENDERER_INSTALLED, SAVE_BASE, SRCPATH, VALIDATES, VAR, VIEWMODELID_BINDER_MAP_KEY, VM
-
-
Constructor Summary
Constructors Constructor Description AnnotateBinder()
new a annotate binder with default event queue name and scopeAnnotateBinder(java.lang.String qname, java.lang.String qscope)
new a binder with event queue name and scope
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
createViewModelProxyIfEnabled(java.lang.Object viewModel)
Internal use onlyvoid
init(Component comp, java.lang.Object vm, java.util.Map<java.lang.String,java.lang.Object> initArgs)
Initializes the binder with a root component and viewModel object.void
initAnnotatedBindings()
This method will parse Zul component's annotation that user declared and callBinder
'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 whileBinderImpl.loadComponent(Component, boolean)
orCommand
been triggered.-
Methods inherited from class org.zkoss.bind.impl.BinderImpl
addChildrenInitBinding, addChildrenLoadBindings, addCommandBinding, addFormAssociatedSaveBinding, addFormInitBinding, addFormLoadBindings, addFormSaveBindings, addGlobalCommandBinding, addPhaseListener, addPropertyInitBinding, addPropertyLoadBindings, addPropertySaveBindings, addReferenceBinding, addSaveFormFieldName, addSaveFormFieldName, checkInit, createParamCall, destroy, doExecute, doLoadAfter, doLoadBefore, doSaveAfter, doSaveBefore, doValidate, fireNotifyChanges, getBindingAnnotationInfoChecker, getBindingExecutionInfoCollector, getBindings, getConverter, getDynamicAttrs, getEvaluatorX, getEventQueue, getForm, getFormAssociatedSaveBindings, getLoadPromptBindings, getMatchMediaValue, getPhaseListener, getPhaseListeners, getQueueName, getQueueScope, getRenderer, getSaveFormFieldNames, getTemplateResolver, getTracker, getValidationMessages, getValidator, getView, getViewModel, hasValidator, initActivator, initQueue, isActivating, loadComponent, loadComponent0, newCommandBinding, newInitChildrenBinding, newInitFormBinding, newInitPropertyBinding, newLoadChildrenBinding, newLoadFormBinding, newLoadPropertyBinding, newSaveFormBinding, newSavePropertyBinding, notifyChange, postCommand, removeBindings, removeBindings, removeBindings, removeSaveFormFieldNames, sendCommand, setDynamicAttrs, setPhaseListener, setTemplate, setValidationMessages, setViewModel, storeForm
-
-
-
-
Constructor Detail
-
AnnotateBinder
public AnnotateBinder()
new a annotate binder with default event queue name and scope
-
AnnotateBinder
public AnnotateBinder(java.lang.String qname, java.lang.String qscope)
new a binder with event queue name and scope- Parameters:
qname
- event queue nameqscope
- event queue scope, seeEventQueues
-
-
Method Detail
-
init
public void init(Component comp, java.lang.Object vm, java.util.Map<java.lang.String,java.lang.Object> initArgs)
Initializes the binder with a root component and viewModel object. You should never call this if you useAnnotateBinder
and zk annotation since 6.0.2, this method will take care of super'sBinder.init(Component, Object, Map)
only
IfAnnotateBinder
need to be used manually,initAnnotatedBindings()
need to be invoked for scanning and building binding syntax tree.- Specified by:
init
in interfaceBinder
- Overrides:
init
in classBinderImpl
- Parameters:
comp
- root component of bindervm
- viewModel objectinitArgs
- args key-value pairs for initial, nullable- See Also:
initAnnotatedBindings()
-
initAnnotatedBindings
public void initAnnotatedBindings()
This method will parse Zul component's annotation that user declared and callBinder
'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 whileBinderImpl.loadComponent(Component, boolean)
orCommand
been triggered.- Since:
- 6.0.2
-
createViewModelProxyIfEnabled
public java.lang.Object createViewModelProxyIfEnabled(java.lang.Object viewModel)
Internal use only
-
-