Package org.zkoss.bind.impl
Class SaveFormBindingImpl
- java.lang.Object
-
- org.zkoss.bind.impl.BindingImpl
-
- org.zkoss.bind.impl.FormBindingImpl
-
- org.zkoss.bind.impl.SaveFormBindingImpl
-
- All Implemented Interfaces:
java.io.Serializable,Binding,FormBinding,SaveBinding,SaveFormBinding
public class SaveFormBindingImpl extends FormBindingImpl implements SaveFormBinding
Implementation ofSaveFormBinding.- 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
Constructors Constructor Description SaveFormBindingImpl(Binder binder, org.zkoss.zk.ui.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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormgetFormBean(BindContext ctx)PropertygetValidate(BindContext ctx)ReturnsPropertyto be validated.java.util.Set<Property>getValidates(BindContext ctx)ReturnsPropertys to be validated, includes the member field of the formValidatorgetValidator()returnValidatorto do validationjava.util.Map<java.lang.String,java.lang.Object>getValidatorArgs()Returns an argument<tags, object>pairs map for validator.java.lang.StringgetValidatorExpressionString()booleanhasValidator()Returns whether to do validation. which means, if true, than getValidator should not return nullprotected booleanignoreTracker()voidsave(BindContext ctx)Save data from the source attribute into the target property.voidvalidate(ValidationContext vctx)do the validation by validator-
Methods inherited from class org.zkoss.bind.impl.FormBindingImpl
getBaseExpression, getCommandName, getConditionType, getFieldExpression, getFormBean, getFormExpression, getFormId, getPropertyString, initFormBean, 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.Binding
getArgs, getBinder, getComponent
-
Methods inherited from interface org.zkoss.bind.sys.FormBinding
getCommandName, getConditionType, getFieldExpression, getFormBean, getFormExpression, getFormId, getPropertyString
-
-
-
-
Constructor Detail
-
SaveFormBindingImpl
public SaveFormBindingImpl(Binder binder, org.zkoss.zk.ui.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:SaveBindingReturns an argument<tags, object>pairs map for validator.- Specified by:
getValidatorArgsin interfaceSaveBinding- Returns:
- an argument
<tags, object>pairs map for validator.
-
ignoreTracker
protected boolean ignoreTracker()
- Overrides:
ignoreTrackerin classFormBindingImpl
-
getValidator
public Validator getValidator()
Description copied from interface:SaveBindingreturnValidatorto do validation- Specified by:
getValidatorin interfaceSaveBinding- Returns:
- the validator if existed
-
getFormBean
public Form getFormBean(BindContext ctx)
-
save
public void save(BindContext ctx)
Description copied from interface:SaveBindingSave data from the source attribute into the target property.- Specified by:
savein interfaceSaveBinding- Parameters:
ctx- the binding runtime context
-
getValidate
public Property getValidate(BindContext ctx)
Description copied from interface:SaveBindingReturnsPropertyto be validated.- Specified by:
getValidatein interfaceSaveBinding- Parameters:
ctx- the binding runtime context- Returns:
Propertyto be validated.
-
getValidates
public java.util.Set<Property> getValidates(BindContext ctx)
Description copied from interface:SaveFormBindingReturnsPropertys to be validated, includes the member field of the form- Specified by:
getValidatesin interfaceSaveFormBinding- Parameters:
ctx- the binding runtime context- Returns:
Propertyto be validated.
-
hasValidator
public boolean hasValidator()
Description copied from interface:SaveBindingReturns whether to do validation. which means, if true, than getValidator should not return null- Specified by:
hasValidatorin interfaceSaveBinding- Returns:
- whether to do validation.
-
getValidatorExpressionString
public java.lang.String getValidatorExpressionString()
-
validate
public void validate(ValidationContext vctx)
Description copied from interface:SaveBindingdo the validation by validator- Specified by:
validatein interfaceSaveBinding
-
-