org.zkoss.bind
Interface Binder

All Known Implementing Classes:
AnnotateBinderImpl, BinderImpl

public interface Binder

The Binder that do the data binding things.

Author:
henrichen

Method Summary
 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 bindins.
 void addFormBindings(Component comp, java.lang.String id, java.lang.String initExpr, java.lang.String[] loadExprs, java.lang.String[] saveExprs, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
          Add new form Bindings.
 void addPropertyBinding(Component comp, java.lang.String attr, java.lang.String initExpr, java.lang.String[] loadExprs, java.lang.String[] saveExprs, java.lang.String converterExpr, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.util.Map<java.lang.String,java.lang.Object> converterArgs, java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
          Add new property Bindings.
 Converter getConverter(java.lang.String name)
          Returns the _converter of the given _converter name.
 BindEvaluatorX getEvaluatorX()
          Returns the BindEvaluatorX used by this Binder.
 Tracker getTracker()
          Returns associated dependency tracker of this binder.
 Validator getValidator(java.lang.String name)
          Returns the _validator of the given _validator name.
 java.lang.Object getViewModel()
          Returns associated ViewModel of this binder.
 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 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 setViewModel(java.lang.Object viewModel)
          Sets associated ViewModel of this binder.
 

Method Detail

getEvaluatorX

BindEvaluatorX getEvaluatorX()
Returns the BindEvaluatorX used by this Binder.

Returns:
the EvaluatorX.

addCommandBinding

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 bindins.

Parameters:
comp - the associated component
evtnm - the associated component event name
commandExpr - the command expression
commandArgs - other key-value pairs pairs for command

addFormBindings

void addFormBindings(Component comp,
                     java.lang.String id,
                     java.lang.String initExpr,
                     java.lang.String[] loadExprs,
                     java.lang.String[] saveExprs,
                     java.lang.String validatorExpr,
                     java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
                     java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
Add new form Bindings.

Parameters:
comp - the associated component, must not null
id - the form id, must not null
initExpr - init expressions ; null to ignore it ; the return value of initExpr must be a Form instance
loadExprs - load expressions
saveExprs - save expressions
validatorExpr - the provided validator expression; null to ignore it
bindingArgs - args key-value pairs for binding.
validatorArgs - args key-value pairs for validator

addPropertyBinding

void addPropertyBinding(Component comp,
                        java.lang.String attr,
                        java.lang.String initExpr,
                        java.lang.String[] loadExprs,
                        java.lang.String[] saveExprs,
                        java.lang.String converterExpr,
                        java.lang.String validatorExpr,
                        java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
                        java.util.Map<java.lang.String,java.lang.Object> converterArgs,
                        java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
Add new property Bindings.

Parameters:
comp - the associated component, must not null
attr - the associated attribute of the component; ex label, style
initExpr - init expressions ; null to ignore it
loadExprs - load expressions
saveExprs - save expressions
converterExpr - the provided converter expression; null to ignore it.
validatorExpr - the provided validator expression; null to ignore it.
bindingArgs - args key-value pairs for binding.
converterArgs - args key-value pairs for converter
validatorArgs - args key-value pairs for validator

removeBindings

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

Parameters:
comp -

removeBindings

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.

Parameters:
comp - the associated component
key - the associated attribute name, event name, or form id

getConverter

Converter getConverter(java.lang.String name)
Returns the _converter of the given _converter name.

Parameters:
name - _converter name
Returns:
the _converter of the given _converter name.

getValidator

Validator getValidator(java.lang.String name)
Returns the _validator of the given _validator name.

Parameters:
name - _validator name
Returns:
the _validator of the given _validator name.

notifyChange

void notifyChange(java.lang.Object bean,
                  java.lang.String property)
Notify change of the property.

Parameters:
bean - the backing bean object.
property - the property of the bean that change the value

sendCommand

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

Parameters:
command - command name
args - , arguments when notifing this command, it will be passed as a arguments of execution method of vm

postCommand

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.

Parameters:
command - command name
args - , arguments when notifing this command, it will be passed as a arguments of execution method of vm

getViewModel

java.lang.Object getViewModel()
Returns associated ViewModel of this binder.

Returns:
associated ViewModel of this binder.

setViewModel

void setViewModel(java.lang.Object viewModel)
Sets associated ViewModel of this binder.

Parameters:
viewModel - the associated view model of this binder.

setPhaseListener

void setPhaseListener(PhaseListener listener)
Sets the associated phase listener to intervene the binding life cycle.

Parameters:
listener - the associated phase listener.

getTracker

Tracker getTracker()
Returns associated dependency tracker of this binder.

Returns:
associated dependency tracker of this binder.


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