org.zkoss.bind.impl
Class BinderImpl

java.lang.Object
  extended by org.zkoss.bind.impl.BinderImpl
All Implemented Interfaces:
java.io.Serializable, Binder, BinderCtrl
Direct Known Subclasses:
AnnotateBinder, DefaultBinder

public class BinderImpl
extends java.lang.Object
implements Binder, BinderCtrl, java.io.Serializable

Implementation of Binder.

Since:
6.0.0
Author:
henrichen, dennischen
See Also:
Serialized Form

Field Summary
static java.lang.String BINDCTX
           
static java.lang.String BINDER
           
static java.lang.String BINDING
           
static java.lang.String DEPENDS_ON_COMP
           
static java.lang.String IGNORE_REF_VALUE
           
static java.lang.String IGNORE_TRACKER
           
static java.lang.String LOAD_FORM_COMPONENT
           
static java.lang.String LOAD_FORM_EXPRESSION
           
static java.lang.String MODEL
           
static java.lang.String NOTIFYS
           
static java.lang.String ON_BIND_CLEAN
           
static java.lang.String ON_BIND_INIT
           
static java.lang.String RENDERER_INSTALLED
           
static java.lang.String SAVE_BASE
           
static java.lang.String SRCPATH
           
static java.lang.String VALIDATES
           
static java.lang.String VAR
           
static java.lang.String VM
           
 
Fields inherited from interface org.zkoss.bind.Binder
ACCESS, CONVERTER, LOAD_EVENT, LOAD_REPLACEMENT, LOAD_TYPE, RENDERER, SAVE_EVENT, SAVE_REPLACEMENT, VALIDATOR, ZKBIND
 
Fields inherited from interface org.zkoss.bind.sys.BinderCtrl
DEFAULT_QUEUE_NAME, DEFAULT_QUEUE_SCOPE, PHASE_LISTENER_CLASS_KEY
 
Constructor Summary
BinderImpl()
           
BinderImpl(java.lang.String qname, java.lang.String qscope)
           
 
Method Summary
 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> args)
          Add a new command binding.
 void addFormAssociatedSaveBinding(Component associatedComp, java.lang.String formId, SaveBinding saveBinding, java.lang.String fieldName)
          Add a association between formId and a associated save binding(save binding inside a form), the form has to exist in the parent components
 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> args)
          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.
protected  void checkInit()
           
 BindingAnnotationInfoChecker getBindingAnnotationInfoChecker()
          get binding annotation info checker
 BindingExecutionInfoCollector getBindingExecutionInfoCollector()
          get binding execution info collector
 Converter getConverter(java.lang.String name)
          Returns the _converter of the given _converter name.
 BindEvaluatorX getEvaluatorX()
          Returns the BindEvaluatorX used by this Binder.
protected  EventQueue<Event> getEventQueue()
           
 Form getForm(Component comp, java.lang.String id)
          Get the form of the component
 java.util.Set<SaveBinding> getFormAssociatedSaveBindings(Component comp)
          Get associated save bindings of a form in a component
 java.util.List<Binding> getLoadPromptBindings(Component comp, java.lang.String attr)
          get all load prompt binding of the component and attribute
 PhaseListener getPhaseListener()
          get the PhaseListener
protected  java.lang.Object getRenderer(java.lang.String name)
           
 TemplateResolver getTemplateResolver(Component comp, java.lang.String attr)
          get the template resolver that sets by Binder.setTemplate(Component, String, String, java.util.Map)
 Tracker getTracker()
          Returns associated dependency tracker of this binder.
 ValidationMessages getValidationMessages()
          Get the ValidationMessages
 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.
 boolean hasValidator(Component comp, java.lang.String attr)
          is there a validator on the attribute of component
 void init(Component comp, java.lang.Object viewModel)
          Deprecated. use init(Component, Object, Map) instead
 void init(Component comp, java.lang.Object viewModel, java.util.Map<java.lang.String,java.lang.Object> initArgs)
          Initializes the binder with a root component and viewModel object.
 boolean isActivating()
          check if binder is in activating state
 void loadComponent(Component comp, boolean loadinit)
          Internal Use only. init and load the component
 void notifyChange(java.lang.Object base, java.lang.String attr)
          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 bindings that associated with the specified component.
 void removeBindings(Component comp, java.lang.String key)
          Remove all bindings that associated with the specified component and key (_fieldExpr|evtnm|formid).
 void 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 setValidationMessages(ValidationMessages messages)
          Set the ValidationMessages
 void setViewModel(java.lang.Object vm)
          Sets associated ViewModel of this binder.
 void storeForm(Component comp, java.lang.String id, Form form)
          Store the form in the component with id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BINDING

public static final java.lang.String BINDING
See Also:
Constant Field Values

BINDER

public static final java.lang.String BINDER
See Also:
Constant Field Values

BINDCTX

public static final java.lang.String BINDCTX
See Also:
Constant Field Values

VAR

public static final java.lang.String VAR
See Also:
Constant Field Values

VM

public static final java.lang.String VM
See Also:
Constant Field Values

NOTIFYS

public static final java.lang.String NOTIFYS
See Also:
Constant Field Values

VALIDATES

public static final java.lang.String VALIDATES
See Also:
Constant Field Values

SRCPATH

public static final java.lang.String SRCPATH
See Also:
Constant Field Values

DEPENDS_ON_COMP

public static final java.lang.String DEPENDS_ON_COMP
See Also:
Constant Field Values

RENDERER_INSTALLED

public static final java.lang.String RENDERER_INSTALLED
See Also:
Constant Field Values

LOAD_FORM_EXPRESSION

public static final java.lang.String LOAD_FORM_EXPRESSION
See Also:
Constant Field Values

LOAD_FORM_COMPONENT

public static final java.lang.String LOAD_FORM_COMPONENT
See Also:
Constant Field Values

IGNORE_TRACKER

public static final java.lang.String IGNORE_TRACKER
See Also:
Constant Field Values

IGNORE_REF_VALUE

public static final java.lang.String IGNORE_REF_VALUE
See Also:
Constant Field Values

SAVE_BASE

public static final java.lang.String SAVE_BASE
See Also:
Constant Field Values

ON_BIND_INIT

public static final java.lang.String ON_BIND_INIT
See Also:
Constant Field Values

ON_BIND_CLEAN

public static final java.lang.String ON_BIND_CLEAN
See Also:
Constant Field Values

MODEL

public static final java.lang.String MODEL
See Also:
Constant Field Values
Constructor Detail

BinderImpl

public BinderImpl()

BinderImpl

public BinderImpl(java.lang.String qname,
                  java.lang.String qscope)
Method Detail

checkInit

protected void checkInit()

init

public void init(Component comp,
                 java.lang.Object viewModel)
Deprecated. use init(Component, Object, Map) instead

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
Parameters:
comp - root component of binder
viewModel - viewModel object

init

public void init(Component comp,
                 java.lang.Object viewModel,
                 java.util.Map<java.lang.String,java.lang.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
Parameters:
comp - root component of binder
viewModel - viewModel object
initArgs - args key-value pairs for initial, nullable
Since:
6.0.1

setViewModel

public void setViewModel(java.lang.Object vm)
Description copied from interface: Binder
Sets associated ViewModel of this binder.

Specified by:
setViewModel in interface Binder
Parameters:
vm - the associated view model of this binder.

getViewModel

public java.lang.Object getViewModel()
Description copied from interface: Binder
Returns associated ViewModel of this binder.

Specified by:
getViewModel in interface Binder
Returns:
associated ViewModel of this binder.

getConverter

public Converter getConverter(java.lang.String name)
Description copied from interface: Binder
Returns the _converter of the given _converter name.

Specified by:
getConverter in interface Binder
Parameters:
name - _converter name
Returns:
the _converter of the given _converter name.

getValidator

public Validator getValidator(java.lang.String name)
Description copied from interface: Binder
Returns the _validator of the given _validator name.

Specified by:
getValidator in interface Binder
Parameters:
name - _validator name
Returns:
the _validator of the given _validator name.

getRenderer

protected java.lang.Object getRenderer(java.lang.String name)

getEvaluatorX

public BindEvaluatorX getEvaluatorX()
Description copied from interface: Binder
Returns the BindEvaluatorX used by this Binder.

Specified by:
getEvaluatorX in interface Binder
Returns:
the EvaluatorX.

storeForm

public void storeForm(Component comp,
                      java.lang.String id,
                      Form form)
Description copied from interface: BinderCtrl
Store the form in the component with id

Specified by:
storeForm in interface BinderCtrl
Parameters:
comp - the component to store the form
id - the form id
form - the form instance

getForm

public Form getForm(Component comp,
                    java.lang.String id)
Description copied from interface: BinderCtrl
Get the form of the component

Specified by:
getForm in interface BinderCtrl
Parameters:
comp - the component has the form
id - the form id
Returns:
the form if there is a form inside the component with the id

addFormInitBinding

public void addFormInitBinding(Component comp,
                               java.lang.String id,
                               java.lang.String initExpr,
                               java.util.Map<java.lang.String,java.lang.Object> initArgs)
Description copied from interface: Binder
init a component form by expression, it only execute once

Specified by:
addFormInitBinding in interface Binder
Parameters:
comp - the associated component, must not null
id - the form id, must not null
initExpr - init expression, nullable
initArgs - args key-value pairs for this init, nullable

addFormLoadBindings

public 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)
Description copied from interface: Binder
Add new form-load-bindings. It create a prompt|conditional form-load-binding depends on beforeCmds and afterCmds. If both beforeCmds and afterCmds are null or empty, it create a prompt binding.

Specified by:
addFormLoadBindings in interface Binder
Parameters:
comp - the associated component, must not null
id - the form id, must not null
loadExpr - load expression, nullable
beforeCmds - load before these commands, the command here is not a EL expression. nullable
afterCmds - load after these commands, the command here is not a EL expression. nullable
bindingArgs - args key-value pairs for this binding, nullable

addFormSaveBindings

public 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)
Description copied from interface: Binder
Add new form-save-bindings. It create a conditional form-save-binding depends on beforeCmds and afterCmds. Since form-save-binding is always triggered by command, if both beforeCmds and afterCmds are null or empty, it throws an exception.

Specified by:
addFormSaveBindings in interface Binder
Parameters:
comp - the associated component, must not null
id - the form id, must not null
saveExpr - save expression, nullable
beforeCmds - save before these commands, the command here is not a EL expression. nullable
afterCmds - save after these commands, the command here is not a EL expression. nullable
bindingArgs - args key-value pairs for this binding, nullable
validatorExpr - the converter expression, nullable
validatorArgs - args key-value pairs for validator, nullable

addPropertyInitBinding

public 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)
Description copied from interface: Binder
init a component property by a expression, it only execute once

Specified by:
addPropertyInitBinding in interface Binder
Parameters:
comp - the associated component, must not null
attr - the associated attribute of the component; ex label, style, must not null
initExpr - init expression, must not null
initArgs - args key-value pairs for initial, nullable
converterExpr - the converter expression, nullable
converterArgs - args key-value pairs for converter, nullable

addPropertyLoadBindings

public 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)
Description copied from interface: Binder
Add new property-load-bindings. It creates a prompt|conditional property-load-binding depends on beforeCmds and afterCmds. If both beforeCmds and afterCmds are null or empty, it create a prompt binding.

Specified by:
addPropertyLoadBindings in interface Binder
Parameters:
comp - the associated component, must not null
attr - the associated attribute of the component; ex label, style, must not null
loadExpr - load expression, must not null
beforeCmds - load before these commands, the command here is not a EL expression. nullable
afterCmds - load after these commands, the command here is not a EL expression. nullable
bindingArgs - args key-value pairs for this binding, nullable
converterExpr - the converter expression, nullable
converterArgs - args key-value pairs for converter, nullable

addPropertySaveBindings

public 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)
Description copied from interface: Binder
Add new property-save-bindings. It creates a prompt|conditional property-save-binding depends on beforeCmds and afterCmds. If both beforeCmds and afterCmds are null or empty, it create a prompt binding.

Specified by:
addPropertySaveBindings in interface Binder
Parameters:
comp - the associated component, must not null
attr - the associated attribute of the component; ex value, check, must not null
saveExpr - save expression, nullable
beforeCmds - save before these commands, the command here is not a EL expression. nullable
afterCmds - save after these commands, the command here is not a EL expression. nullable
bindingArgs - args key-value pairs for this binding, nullable
converterExpr - the converter expression, nullable
converterArgs - args key-value pairs for converter, nullable
validatorExpr - the converter expression, nullable
validatorArgs - args key-value pairs for validator, nullable

addChildrenInitBinding

@Deprecated
public void addChildrenInitBinding(Component comp,
                                              java.lang.String initExpr,
                                              java.util.Map<java.lang.String,java.lang.Object> initArgs)
Deprecated. 

Description copied from interface: Binder
init children of a component by an expression, it only execute once

Specified by:
addChildrenInitBinding in interface Binder
Parameters:
comp - the associated component, must not null
initExpr - init expression, must not null
initArgs - args key-value pairs for initial, nullable

addChildrenInitBinding

public 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)
Description copied from interface: Binder
init children of a component by an expression, it only execute once

Specified by:
addChildrenInitBinding in interface Binder
Parameters:
comp - the associated component, must not null
initExpr - init expression, must not null
initArgs - args key-value pairs for initial, nullable
converterExpr - the converter expression, nullable
converterArgs - args key-value pairs for converter, nullable

addChildrenLoadBindings

@Deprecated
public 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. 

Description copied from interface: Binder
Add new children-load-bindings. It creates a prompt|conditional children-load-binding depends on beforeCmds and afterCmds. If both beforeCmds and afterCmds are null or empty, it create a prompt binding.

Specified by:
addChildrenLoadBindings in interface Binder
Parameters:
comp - the associated component, must not null
loadExpr - load expression, must not null
beforeCmds - load before these commands, the command here is not a EL expression. nullable
afterCmds - load after these commands, the command here is not a EL expression. nullable
bindingArgs - args key-value pairs for this binding, nullable

addChildrenLoadBindings

public 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)
Description copied from interface: Binder
Add new children-load-bindings. It creates a prompt|conditional children-load-binding depends on beforeCmds and afterCmds. If both beforeCmds and afterCmds are null or empty, it create a prompt binding.

Specified by:
addChildrenLoadBindings in interface Binder
Parameters:
comp - the associated component, must not null
loadExpr - load expression, must not null
beforeCmds - load before these commands, the command here is not a EL expression. nullable
afterCmds - load after these commands, the command here is not a EL expression. nullable
bindingArgs - args key-value pairs for this binding, nullable
converterExpr - the converter expression, nullable
converterArgs - args key-value pairs for converter, nullable

addReferenceBinding

public void addReferenceBinding(Component comp,
                                java.lang.String attr,
                                java.lang.String loadExpr,
                                java.util.Map<java.lang.String,java.lang.Object> bindingArgs)
Description copied from interface: Binder
Add a new reference-binding. It creates an attribute as the reference of the expression in the component.

Specified by:
addReferenceBinding in interface Binder
Parameters:
comp - the associated component, must not null
attr - the name of reference that stored in the component; ex myval, must not null
loadExpr - load expression, must not null
bindingArgs - args key-value pairs for this binding, nullable

addCommandBinding

public void addCommandBinding(Component comp,
                              java.lang.String evtnm,
                              java.lang.String commandExpr,
                              java.util.Map<java.lang.String,java.lang.Object> args)
Description copied from interface: Binder
Add a new command binding.

Specified by:
addCommandBinding in interface Binder
Parameters:
comp - the associated component
evtnm - the associated component event name
commandExpr - the command expression
args - other key-value pairs pairs for command

addGlobalCommandBinding

public void addGlobalCommandBinding(Component comp,
                                    java.lang.String evtnm,
                                    java.lang.String commandExpr,
                                    java.util.Map<java.lang.String,java.lang.Object> args)
Description copied from interface: Binder
Add a new global-command binding.

Specified by:
addGlobalCommandBinding in interface Binder
Parameters:
comp - the associated component
evtnm - the associated component event name
commandExpr - the command expression
args - other key-value pairs pairs for command

isActivating

public boolean isActivating()
Description copied from interface: BinderCtrl
check if binder is in activating state

Specified by:
isActivating in interface BinderCtrl
Returns:
true if binder is currently in activating state
Since:
6.0.1

sendCommand

public void sendCommand(java.lang.String command,
                        java.util.Map<java.lang.String,java.lang.Object> args)
Description copied from interface: Binder
send command fired to this binder and process the command immediately

Specified by:
sendCommand in interface Binder
Parameters:
command - command name
args - , arguments when notifying this command, it will be passed as a arguments of execution method of vm

postCommand

public void postCommand(java.lang.String command,
                        java.util.Map<java.lang.String,java.lang.Object> args)
Description copied from interface: Binder
post command this binder, binder will queue the command, and fired later.

Specified by:
postCommand in interface Binder
Parameters:
command - command name
args - , arguments when notifying this command, it will be passed as a arguments of execution method of vm

removeBindings

public void removeBindings(Component comp)
Remove all bindings that associated with the specified component.

Specified by:
removeBindings in interface Binder
Parameters:
comp - the component

removeBindings

public void removeBindings(Component comp,
                           java.lang.String key)
Remove all bindings that associated with the specified component and key (_fieldExpr|evtnm|formid).

Specified by:
removeBindings in interface Binder
Parameters:
comp - the component
key - can be component attribute, event name, or form id

getLoadPromptBindings

public java.util.List<Binding> getLoadPromptBindings(Component comp,
                                                     java.lang.String attr)
Description copied from interface: BinderCtrl
get all load prompt binding of the component and attribute

Specified by:
getLoadPromptBindings in interface BinderCtrl
Parameters:
comp - the component is relative to the bindings
attr - the attribute is relative to the bindings
Returns:
the prompt-load-bindings

setTemplate

public void setTemplate(Component comp,
                        java.lang.String attr,
                        java.lang.String templateExpr,
                        java.util.Map<java.lang.String,java.lang.Object> templateArgs)
Description copied from interface: Binder
set template to a component property by an expression

Specified by:
setTemplate in interface Binder
Parameters:
comp - the associated component, must not null
attr - the associated attribute of the component; ex label, style, must not null
templateExpr - template expression, must not null
templateArgs - args key-value pairs for template, nullable

getTemplateResolver

public TemplateResolver getTemplateResolver(Component comp,
                                            java.lang.String attr)
Description copied from interface: BinderCtrl
get the template resolver that sets by Binder.setTemplate(Component, String, String, java.util.Map)

Specified by:
getTemplateResolver in interface BinderCtrl
Parameters:
comp - the component has resolvers
attr - the attribute to get the resolver
Returns:
the resolver, null if not existed.

getTracker

public Tracker getTracker()
Description copied from interface: BinderCtrl
Returns associated dependency tracker of this binder.

Specified by:
getTracker in interface BinderCtrl
Returns:
associated dependency tracker of this binder.

loadComponent

public void loadComponent(Component comp,
                          boolean loadinit)
Internal Use only. init and load the component

Specified by:
loadComponent in interface Binder
Parameters:
comp - the component to reload
loadinit - true if should also load the init-binding

notifyChange

public void notifyChange(java.lang.Object base,
                         java.lang.String attr)
Description copied from interface: Binder
Notify change of the property.

Specified by:
notifyChange in interface Binder
Parameters:
base - the backing bean object.
attr - the property of the bean that change the value

setPhaseListener

public void setPhaseListener(PhaseListener listener)
Description copied from interface: Binder
Sets the associated phase listener to intervene the binding life cycle.

Specified by:
setPhaseListener in interface Binder
Specified by:
setPhaseListener in interface BinderCtrl
Parameters:
listener - the associated phase listener.

getPhaseListener

public PhaseListener getPhaseListener()
Description copied from interface: BinderCtrl
get the PhaseListener

Specified by:
getPhaseListener in interface BinderCtrl
Returns:
the PhaseListener

getEventQueue

protected EventQueue<Event> getEventQueue()

addFormAssociatedSaveBinding

public void addFormAssociatedSaveBinding(Component associatedComp,
                                         java.lang.String formId,
                                         SaveBinding saveBinding,
                                         java.lang.String fieldName)
Description copied from interface: BinderCtrl
Add a association between formId and a associated save binding(save binding inside a form), the form has to exist in the parent components

Specified by:
addFormAssociatedSaveBinding in interface BinderCtrl
Parameters:
associatedComp - associated component inside a form binding
formId - the form id
saveBinding - the nested save binding in side a form binding
fieldName - the associated form fieldName for the associated save binding

getFormAssociatedSaveBindings

public java.util.Set<SaveBinding> getFormAssociatedSaveBindings(Component comp)
Description copied from interface: BinderCtrl
Get associated save bindings of a form in a component

Specified by:
getFormAssociatedSaveBindings in interface BinderCtrl
Parameters:
comp - the component that contains the form
Returns:
all associated save binding in the form

hasValidator

public boolean hasValidator(Component comp,
                            java.lang.String attr)
Description copied from interface: BinderCtrl
is there a validator on the attribute of component

Specified by:
hasValidator in interface BinderCtrl
Parameters:
comp - the component to check
attr - the attribute to check
Returns:
true if there is a validator

getView

public Component getView()
Description copied from interface: Binder
Returns associated root component of this binder.

Specified by:
getView in interface Binder
Returns:
associated root component of this binder.

getValidationMessages

public ValidationMessages getValidationMessages()
Description copied from interface: BinderCtrl
Get the ValidationMessages

Specified by:
getValidationMessages in interface BinderCtrl
Returns:
null if no one set the instance by BinderCtrl.setValidationMessages(ValidationMessages)

setValidationMessages

public void setValidationMessages(ValidationMessages messages)
Description copied from interface: BinderCtrl
Set the ValidationMessages

Specified by:
setValidationMessages in interface BinderCtrl
Parameters:
messages - the ValidationMessages

getBindingExecutionInfoCollector

public BindingExecutionInfoCollector getBindingExecutionInfoCollector()
Description copied from interface: BinderCtrl
get binding execution info collector

Specified by:
getBindingExecutionInfoCollector in interface BinderCtrl
Returns:
the collector instance or null if no collector is existed

getBindingAnnotationInfoChecker

public BindingAnnotationInfoChecker getBindingAnnotationInfoChecker()
Description copied from interface: BinderCtrl
get binding annotation info checker

Specified by:
getBindingAnnotationInfoChecker in interface BinderCtrl
Returns:
the collector instance or null if no collector is existed


Copyright © 2005-2011 Potix Corporation. All Rights Reserved. SourceForge.net Logo