public interface Binder
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS
Attribute of
ZKBIND annotation, the access direction: can be "both", "save", "load"; default to "load" if not found |
static int |
COMMAND_FAIL_VALIDATE
Indicates the doing command is failure with some validation errors.
|
static int |
COMMAND_SUCCESS
Indicates the doing command is successful.
|
static java.lang.String |
CONVERTER
Attribute of
ZKBIND annotation, the system converter for special properties. e.g. |
static java.lang.String |
LOAD_EVENT
Attribute of
ZKBIND annotation, the load trigger event; meaningful only when ACCESS is "both" or "load" or not found(default to "load"). |
static java.lang.String |
LOAD_REPLACEMENT
Attribute of
ZKBIND annotation, the load replacement ; e.g. value of textbox, it loads to rawValue |
static java.lang.String |
LOAD_TYPE
Attribute of
ZKBIND annotation, the type of attribute for loading; e.g. rawValue of textbox is java.lang.String |
static java.lang.String |
RENDERER
Attribute of
ZKBIND annotation, the special renderer for binding |
static java.lang.String |
SAVE_EVENT
Attribute of
ZKBIND annotation, the save trigger event; meaningful only when ACCESS is "both" or "save". |
static java.lang.String |
SAVE_REPLACEMENT
Attribute of
ZKBIND annotation, the save replacement ; e.g. selectedItem of selectbox, it save the value selectedIndex (via converter) to bean |
static java.lang.String |
VALIDATOR
Attribute of
ZKBIND annotation, the system validator for special properties. |
static java.lang.String |
ZKBIND
Component annotation of ZKBind
|
Modifier and Type | Method and Description |
---|---|
void |
addChildrenInitBinding(Component comp,
java.lang.String initExpr,
java.util.Map<java.lang.String,java.lang.Object> initArgs)
Deprecated.
|
void |
addChildrenInitBinding(Component comp,
java.lang.String initExpr,
java.util.Map<java.lang.String,java.lang.Object> initArgs,
java.lang.String converterExpr,
java.util.Map<java.lang.String,java.lang.Object> converterArgs)
init children of a component by an expression, it only execute once
|
void |
addChildrenLoadBindings(Component comp,
java.lang.String loadExpr,
java.lang.String[] beforeCmds,
java.lang.String[] afterCmds,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
Deprecated.
|
void |
addChildrenLoadBindings(Component comp,
java.lang.String loadExpr,
java.lang.String[] beforeCmds,
java.lang.String[] afterCmds,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
java.lang.String converterExpr,
java.util.Map<java.lang.String,java.lang.Object> converterArgs)
Add new children-load-bindings.
|
void |
addCommandBinding(Component comp,
java.lang.String evtnm,
java.lang.String commandExpr,
java.util.Map<java.lang.String,java.lang.Object> commandArgs)
Add a new command binding.
|
void |
addFormInitBinding(Component comp,
java.lang.String id,
java.lang.String initExpr,
java.util.Map<java.lang.String,java.lang.Object> initArgs)
init a component form by expression, it only execute once
|
void |
addFormLoadBindings(Component comp,
java.lang.String id,
java.lang.String loadExpr,
java.lang.String[] beforeCmds,
java.lang.String[] afterCmds,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
Add new form-load-bindings.
|
void |
addFormSaveBindings(Component comp,
java.lang.String id,
java.lang.String saveExpr,
java.lang.String[] beforeCmds,
java.lang.String[] afterCmds,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
java.lang.String validatorExpr,
java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
Add new form-save-bindings.
|
void |
addGlobalCommandBinding(Component comp,
java.lang.String evtnm,
java.lang.String commandExpr,
java.util.Map<java.lang.String,java.lang.Object> commandArgs)
Add a new global-command binding.
|
void |
addPropertyInitBinding(Component comp,
java.lang.String attr,
java.lang.String initExpr,
java.util.Map<java.lang.String,java.lang.Object> initArgs,
java.lang.String converterExpr,
java.util.Map<java.lang.String,java.lang.Object> converterArgs)
init a component property by a expression, it only execute once
|
void |
addPropertyLoadBindings(Component comp,
java.lang.String attr,
java.lang.String loadExpr,
java.lang.String[] beforeCmds,
java.lang.String[] afterCmds,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
java.lang.String converterExpr,
java.util.Map<java.lang.String,java.lang.Object> converterArgs)
Add new property-load-bindings.
|
void |
addPropertySaveBindings(Component comp,
java.lang.String attr,
java.lang.String saveExpr,
java.lang.String[] beforeCmds,
java.lang.String[] afterCmds,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
java.lang.String converterExpr,
java.util.Map<java.lang.String,java.lang.Object> converterArgs,
java.lang.String validatorExpr,
java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
Add new property-save-bindings.
|
void |
addReferenceBinding(Component comp,
java.lang.String attr,
java.lang.String loadExpr,
java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
Add a new reference-binding.
|
Converter |
getConverter(java.lang.String name)
Returns the _converter of the given _converter name.
|
BindEvaluatorX |
getEvaluatorX()
Returns the
BindEvaluatorX used by this Binder. |
Validator |
getValidator(java.lang.String name)
Returns the _validator of the given _validator name.
|
Component |
getView()
Returns associated root component of this binder.
|
java.lang.Object |
getViewModel()
Returns associated ViewModel of this binder.
|
void |
init(Component root,
java.lang.Object viewModel)
Deprecated.
use
init(Component, Object, Map) instead |
void |
init(Component root,
java.lang.Object viewModel,
java.util.Map<java.lang.String,java.lang.Object> initArgs)
Initializes the binder with a root component and viewModel object.
|
void |
loadComponent(Component comp,
boolean loadinit)
Load the load-binding of the component.
|
void |
notifyChange(java.lang.Object bean,
java.lang.String property)
Notify change of the property.
|
void |
postCommand(java.lang.String command,
java.util.Map<java.lang.String,java.lang.Object> args)
post command this binder, binder will queue the command, and fired later.
|
void |
removeBindings(Component comp)
Remove all managed bindings that associated with the specified component.
|
void |
removeBindings(Component comp,
java.lang.String key)
Remove all managed Binding that associated with the specified
component and attribute name, event name, or form id.
|
void |
removeBindings(java.util.Set<Component> comps)
Remove all managed bindings that associated with the specified components.
|
int |
sendCommand(java.lang.String command,
java.util.Map<java.lang.String,java.lang.Object> args)
send command fired to this binder and process the command immediately
|
void |
setPhaseListener(PhaseListener listener)
Sets the associated phase listener to intervene the binding life cycle.
|
void |
setTemplate(Component comp,
java.lang.String attr,
java.lang.String templateExpr,
java.util.Map<java.lang.String,java.lang.Object> templateArgs)
set template to a component property by an expression
|
void |
setViewModel(java.lang.Object viewModel)
Sets associated ViewModel of this binder.
|
static final java.lang.String ZKBIND
static final java.lang.String RENDERER
ZKBIND
annotation, the special renderer for bindingstatic final java.lang.String LOAD_EVENT
ZKBIND
annotation, the load trigger event; meaningful only when ACCESS is "both" or "load" or not found(default to "load").static final java.lang.String SAVE_EVENT
ZKBIND
annotation, the save trigger event; meaningful only when ACCESS is "both" or "save".static final java.lang.String ACCESS
ZKBIND
annotation, the access direction: can be "both", "save", "load"; default to "load" if not foundstatic final java.lang.String CONVERTER
ZKBIND
annotation, the system converter for special properties. e.g. SelectedItem in listbox. see SelectedListitemConverter.javastatic final java.lang.String VALIDATOR
ZKBIND
annotation, the system validator for special properties.static final java.lang.String LOAD_REPLACEMENT
ZKBIND
annotation, the load replacement ; e.g. value of textbox, it loads to rawValuestatic final java.lang.String LOAD_TYPE
ZKBIND
annotation, the type of attribute for loading; e.g. rawValue of textbox is java.lang.Stringstatic final java.lang.String SAVE_REPLACEMENT
ZKBIND
annotation, the save replacement ; e.g. selectedItem of selectbox, it save the value selectedIndex (via converter) to beanstatic final int COMMAND_SUCCESS
static final int COMMAND_FAIL_VALIDATE
void init(Component root, java.lang.Object viewModel)
init(Component, Object, Map)
insteadAnnotateBinder
and zk annotationroot
- root component of binderviewModel
- viewModel objectvoid init(Component root, java.lang.Object viewModel, java.util.Map<java.lang.String,java.lang.Object> initArgs)
AnnotateBinder
and zk annotationroot
- root component of binderviewModel
- viewModel objectinitArgs
- args key-value pairs for initial, nullablevoid loadComponent(Component comp, boolean loadinit)
comp
- the component to reloadloadinit
- true if should also load the init-bindingBindEvaluatorX getEvaluatorX()
BindEvaluatorX
used by this Binder.void addCommandBinding(Component comp, java.lang.String evtnm, java.lang.String commandExpr, java.util.Map<java.lang.String,java.lang.Object> commandArgs)
comp
- the associated componentevtnm
- the associated component event namecommandExpr
- the command expressioncommandArgs
- other key-value pairs pairs for commandvoid addGlobalCommandBinding(Component comp, java.lang.String evtnm, java.lang.String commandExpr, java.util.Map<java.lang.String,java.lang.Object> commandArgs)
comp
- the associated componentevtnm
- the associated component event namecommandExpr
- the command expressioncommandArgs
- other key-value pairs pairs for commandvoid setTemplate(Component comp, java.lang.String attr, java.lang.String templateExpr, java.util.Map<java.lang.String,java.lang.Object> templateArgs)
comp
- the associated component, must not nullattr
- the associated attribute of the component; ex label, style, must not nulltemplateExpr
- template expression, must not nulltemplateArgs
- args key-value pairs for template, nullablevoid addPropertyInitBinding(Component comp, java.lang.String attr, java.lang.String initExpr, java.util.Map<java.lang.String,java.lang.Object> initArgs, java.lang.String converterExpr, java.util.Map<java.lang.String,java.lang.Object> converterArgs)
comp
- the associated component, must not nullattr
- the associated attribute of the component; ex label, style, must not nullinitExpr
- init expression, must not nullinitArgs
- args key-value pairs for initial, nullableconverterExpr
- the converter expression, nullableconverterArgs
- args key-value pairs for converter, nullablevoid addPropertyLoadBindings(Component comp, java.lang.String attr, java.lang.String loadExpr, java.lang.String[] beforeCmds, java.lang.String[] afterCmds, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.lang.String converterExpr, java.util.Map<java.lang.String,java.lang.Object> converterArgs)
comp
- the associated component, must not nullattr
- the associated attribute of the component; ex label, style, must not nullloadExpr
- load expression, must not nullbeforeCmds
- load before these commands, the command here is not a EL expression. nullableafterCmds
- load after these commands, the command here is not a EL expression. nullablebindingArgs
- args key-value pairs for this binding, nullableconverterExpr
- the converter expression, nullableconverterArgs
- args key-value pairs for converter, nullablevoid addPropertySaveBindings(Component comp, java.lang.String attr, java.lang.String saveExpr, java.lang.String[] beforeCmds, java.lang.String[] afterCmds, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.lang.String converterExpr, java.util.Map<java.lang.String,java.lang.Object> converterArgs, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
comp
- the associated component, must not nullattr
- the associated attribute of the component; ex value, check, must not nullsaveExpr
- save expression, nullablebeforeCmds
- save before these commands, the command here is not a EL expression. nullableafterCmds
- save after these commands, the command here is not a EL expression. nullablebindingArgs
- args key-value pairs for this binding, nullableconverterExpr
- the converter expression, nullableconverterArgs
- args key-value pairs for converter, nullablevalidatorExpr
- the converter expression, nullablevalidatorArgs
- args key-value pairs for validator, nullablevoid addFormInitBinding(Component comp, java.lang.String id, java.lang.String initExpr, java.util.Map<java.lang.String,java.lang.Object> initArgs)
comp
- the associated component, must not nullid
- the form id, must not nullinitExpr
- init expression, nullableinitArgs
- args key-value pairs for this init, nullablevoid addFormLoadBindings(Component comp, java.lang.String id, java.lang.String loadExpr, java.lang.String[] beforeCmds, java.lang.String[] afterCmds, java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
comp
- the associated component, must not nullid
- the form id, must not nullloadExpr
- load expression, nullablebeforeCmds
- load before these commands, the command here is not a EL expression. nullableafterCmds
- load after these commands, the command here is not a EL expression. nullablebindingArgs
- args key-value pairs for this binding, nullablevoid addFormSaveBindings(Component comp, java.lang.String id, java.lang.String saveExpr, java.lang.String[] beforeCmds, java.lang.String[] afterCmds, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
comp
- the associated component, must not nullid
- the form id, must not nullsaveExpr
- save expression, nullablebeforeCmds
- save before these commands, the command here is not a EL expression. nullableafterCmds
- save after these commands, the command here is not a EL expression. nullablebindingArgs
- args key-value pairs for this binding, nullablevalidatorExpr
- the converter expression, nullablevalidatorArgs
- args key-value pairs for validator, nullablejava.lang.IllegalArgumentException
- if beforeCmds or afterCmds are both null or emptyvoid addChildrenInitBinding(Component comp, java.lang.String initExpr, java.util.Map<java.lang.String,java.lang.Object> initArgs)
addChildrenInitBinding(Component, String, Map, String, Map)
instead.comp
- the associated component, must not nullinitExpr
- init expression, must not nullinitArgs
- args key-value pairs for initial, nullablevoid addChildrenInitBinding(Component comp, java.lang.String initExpr, java.util.Map<java.lang.String,java.lang.Object> initArgs, java.lang.String converterExpr, java.util.Map<java.lang.String,java.lang.Object> converterArgs)
comp
- the associated component, must not nullinitExpr
- init expression, must not nullinitArgs
- args key-value pairs for initial, nullableconverterExpr
- the converter expression, nullableconverterArgs
- args key-value pairs for converter, nullablevoid addChildrenLoadBindings(Component comp, java.lang.String loadExpr, java.lang.String[] beforeCmds, java.lang.String[] afterCmds, java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
addChildrenLoadBindings(Component, String, String[], String[], Map, String, Map)
instead.comp
- the associated component, must not nullloadExpr
- load expression, must not nullbeforeCmds
- load before these commands, the command here is not a EL expression. nullableafterCmds
- load after these commands, the command here is not a EL expression. nullablebindingArgs
- args key-value pairs for this binding, nullablevoid addChildrenLoadBindings(Component comp, java.lang.String loadExpr, java.lang.String[] beforeCmds, java.lang.String[] afterCmds, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.lang.String converterExpr, java.util.Map<java.lang.String,java.lang.Object> converterArgs)
comp
- the associated component, must not nullloadExpr
- load expression, must not nullbeforeCmds
- load before these commands, the command here is not a EL expression. nullableafterCmds
- load after these commands, the command here is not a EL expression. nullablebindingArgs
- args key-value pairs for this binding, nullableconverterExpr
- the converter expression, nullableconverterArgs
- args key-value pairs for converter, nullablevoid addReferenceBinding(Component comp, java.lang.String attr, java.lang.String loadExpr, java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
comp
- the associated component, must not nullattr
- the name of reference that stored in the component; ex myval, must not nullloadExpr
- load expression, must not nullbindingArgs
- args key-value pairs for this binding, nullablevoid removeBindings(Component comp)
comp
- void removeBindings(java.util.Set<Component> comps)
comps
- void removeBindings(Component comp, java.lang.String key)
comp
- the associated componentkey
- the associated attribute name, event name, or form idConverter getConverter(java.lang.String name)
name
- _converter nameValidator getValidator(java.lang.String name)
name
- _validator namevoid notifyChange(java.lang.Object bean, java.lang.String property)
bean
- the backing bean object.property
- the property of the bean that change the valueint sendCommand(java.lang.String command, java.util.Map<java.lang.String,java.lang.Object> args)
command
- command nameargs
- , arguments when notifying this command, it will be passed as a arguments of execution method of vmvoid postCommand(java.lang.String command, java.util.Map<java.lang.String,java.lang.Object> args)
command
- command nameargs
- , arguments when notifying this command, it will be passed as a arguments of execution method of vmjava.lang.Object getViewModel()
void setViewModel(java.lang.Object viewModel)
viewModel
- the associated view model of this binder.void setPhaseListener(PhaseListener listener)
listener
- the associated phase listener.Component getView()
Copyright © 2005-2018 Potix Corporation. All Rights Reserved.