org.zkoss.bind.impl
Class SaveFormBindingImpl

java.lang.Object
  extended by org.zkoss.bind.impl.BindingImpl
      extended by org.zkoss.bind.impl.FormBindingImpl
          extended by org.zkoss.bind.impl.SaveFormBindingImpl
All Implemented Interfaces:
java.io.Serializable, Binding, FormBinding, SaveBinding, SaveFormBinding

public class SaveFormBindingImpl
extends FormBindingImpl
implements SaveFormBinding

Implementation of SaveFormBinding.

Since:
6.0.0
Author:
henrichen
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.zkoss.bind.impl.FormBindingImpl
_accessInfo, _formId
 
Constructor Summary
SaveFormBindingImpl(Binder binder, Component comp, java.lang.String formId, java.lang.String saveExpr, ConditionType conditionType, java.lang.String command, java.util.Map<java.lang.String,java.lang.Object> bindingArgs, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
           
 
Method Summary
 Property getValidate(BindContext ctx)
          Returns Property to be validated.
 java.util.Set<Property> getValidates(BindContext ctx)
          Returns Propertys to be validated, includes the member field of the form
 Validator getValidator()
          return Validator to do validation
 java.util.Map<java.lang.String,java.lang.Object> getValidatorArgs()
          Returns an argument pairs map for validator.
 java.lang.String getValidatorExpressionString()
           
 boolean hasValidator()
          Returns whether to do validation. which means, if true, than getValidator should not return null
protected  boolean ignoreTracker()
           
 void save(BindContext ctx)
          Save data from the source attribute into the target property.
 void validate(ValidationContext vctx)
          do the validation by validator
 
Methods inherited from class org.zkoss.bind.impl.FormBindingImpl
getBaseExpression, getCommandName, getConditionType, getFieldExpression, getFormBean, getFormExpression, getFormId, getPropertyString, toString
 
Methods inherited from class org.zkoss.bind.impl.BindingImpl
containsAttribute, getArgs, getAttribute, getBinder, getComponent, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.zkoss.bind.sys.FormBinding
getCommandName, getConditionType, getFormBean, getFormId, getPropertyString
 
Methods inherited from interface org.zkoss.bind.sys.Binding
getArgs, getBinder, getComponent
 

Constructor Detail

SaveFormBindingImpl

public SaveFormBindingImpl(Binder binder,
                           Component comp,
                           java.lang.String formId,
                           java.lang.String saveExpr,
                           ConditionType conditionType,
                           java.lang.String command,
                           java.util.Map<java.lang.String,java.lang.Object> bindingArgs,
                           java.lang.String validatorExpr,
                           java.util.Map<java.lang.String,java.lang.Object> validatorArgs)
Method Detail

getValidatorArgs

public java.util.Map<java.lang.String,java.lang.Object> getValidatorArgs()
Description copied from interface: SaveBinding
Returns an argument pairs map for validator.

Specified by:
getValidatorArgs in interface SaveBinding
Returns:
an argument pairs map for validator.

ignoreTracker

protected boolean ignoreTracker()
Overrides:
ignoreTracker in class FormBindingImpl

getValidator

public Validator getValidator()
Description copied from interface: SaveBinding
return Validator to do validation

Specified by:
getValidator in interface SaveBinding
Returns:
the validator if existed

save

public void save(BindContext ctx)
Description copied from interface: SaveBinding
Save data from the source attribute into the target property.

Specified by:
save in interface SaveBinding
Parameters:
ctx - the binding runtime context

getValidate

public Property getValidate(BindContext ctx)
Description copied from interface: SaveBinding
Returns Property to be validated.

Specified by:
getValidate in interface SaveBinding
Parameters:
ctx - the binding runtime context
Returns:
Property to be validated.

getValidates

public java.util.Set<Property> getValidates(BindContext ctx)
Description copied from interface: SaveFormBinding
Returns Propertys to be validated, includes the member field of the form

Specified by:
getValidates in interface SaveFormBinding
Parameters:
ctx - the binding runtime context
Returns:
Property to be validated.

hasValidator

public boolean hasValidator()
Description copied from interface: SaveBinding
Returns whether to do validation. which means, if true, than getValidator should not return null

Specified by:
hasValidator in interface SaveBinding
Returns:
whether to do validation.

getValidatorExpressionString

public java.lang.String getValidatorExpressionString()

validate

public void validate(ValidationContext vctx)
Description copied from interface: SaveBinding
do the validation by validator

Specified by:
validate in interface SaveBinding


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