Package org.zkoss.bind.impl
Class SavePropertyBindingImpl
- java.lang.Object
-
- org.zkoss.bind.impl.BindingImpl
-
- org.zkoss.bind.impl.PropertyBindingImpl
-
- org.zkoss.bind.impl.SavePropertyBindingImpl
-
- All Implemented Interfaces:
java.io.Serializable
,Binding
,PropertyBinding
,SaveBinding
,SavePropertyBinding
public class SavePropertyBindingImpl extends PropertyBindingImpl implements SavePropertyBinding
Implementation ofSavePropertyBinding
.- Since:
- 6.0.0
- Author:
- henrichen
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.zkoss.bind.impl.PropertyBindingImpl
_accessInfo, _fieldExpr
-
-
Constructor Summary
Constructors Constructor Description SavePropertyBindingImpl(Binder binder, Component comp, java.lang.String attr, java.lang.String saveAttr, java.lang.String saveExpr, ConditionType conditionType, java.lang.String command, 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)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Property
getBasePropertyIfFromCollection()
Internal use only, only for collectionsProperty
getValidate(BindContext ctx)
ReturnsProperty
to be validated.Validator
getValidator()
returnValidator
to do validationjava.util.Map<java.lang.String,java.lang.Object>
getValidatorArgs()
Returns an argument<tags, object>
pairs map for validator.java.lang.String
getValidatorExpressionString()
boolean
hasValidator()
Returns whether to do validation. which means, if true, than getValidator should not return nullprotected 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.PropertyBindingImpl
getCommandName, getConditionType, getConverter, getConverterArgs, getFieldName, getProperty, 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.Binding
getArgs, getBinder, getComponent
-
Methods inherited from interface org.zkoss.bind.sys.PropertyBinding
getCommandName, getConditionType, getConverter, getConverterArgs, getFieldName, getProperty, getPropertyString
-
-
-
-
Constructor Detail
-
SavePropertyBindingImpl
public SavePropertyBindingImpl(Binder binder, Component comp, java.lang.String attr, java.lang.String saveAttr, java.lang.String saveExpr, ConditionType conditionType, java.lang.String command, 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)
-
-
Method Detail
-
getValidatorArgs
public java.util.Map<java.lang.String,java.lang.Object> getValidatorArgs()
Description copied from interface:SaveBinding
Returns an argument<tags, object>
pairs map for validator.- Specified by:
getValidatorArgs
in interfaceSaveBinding
- Returns:
- an argument
<tags, object>
pairs map for validator.
-
ignoreTracker
protected boolean ignoreTracker()
- Overrides:
ignoreTracker
in classPropertyBindingImpl
-
getValidator
public Validator getValidator()
Description copied from interface:SaveBinding
returnValidator
to do validation- Specified by:
getValidator
in interfaceSaveBinding
- Returns:
- the validator if existed
-
getValidatorExpressionString
public java.lang.String getValidatorExpressionString()
-
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 interfaceSaveBinding
- Parameters:
ctx
- the binding runtime context
-
getValidate
public Property getValidate(BindContext ctx)
Description copied from interface:SaveBinding
ReturnsProperty
to be validated.- Specified by:
getValidate
in interfaceSaveBinding
- 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 interfaceSaveBinding
- Returns:
- whether to do validation.
-
validate
public void validate(ValidationContext vctx)
Description copied from interface:SaveBinding
do the validation by validator- Specified by:
validate
in interfaceSaveBinding
-
getBasePropertyIfFromCollection
public Property getBasePropertyIfFromCollection()
Internal use only, only for collections
-
-