Package org.zkoss.clientbind
Class ClientSavePropertyBindingImpl
- java.lang.Object
-
- org.zkoss.clientbind.ClientSavePropertyBindingImpl
-
- All Implemented Interfaces:
Binding,PropertyBinding,SaveBinding,SavePropertyBinding
public class ClientSavePropertyBindingImpl extends java.lang.Object implements SavePropertyBinding
Client save property binding implementation.- Author:
- jumperchen
-
-
Constructor Summary
Constructors Constructor Description ClientSavePropertyBindingImpl(ClientBinder binder, Component comp, java.lang.String fieldName, Property property, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> validatorArgs, java.util.Set<Property> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.Object>getArgs()Returns an argument<tags, object>pairs map(read only).BindergetBinder()Returns the owner binder of this binding.java.lang.StringgetCommandName()Returns the associated command name of this binding; null if not speicified.ComponentgetComponent()Returns the associated component of this binding.ConditionTypegetConditionType()Returns the condition type of this bindingConvertergetConverter()Returns the associated _converter with this binding.java.util.Map<java.lang.String,java.lang.Object>getConverterArgs()Returns an argument<tags, object>pairs map for converter.java.lang.StringgetFieldName()Returns the field name of the source object.java.util.Set<Property>getProperties()ExpressionXgetProperty()java.lang.StringgetPropertyString()Returns the property expression script of this binding.PropertygetValidate(BindContext bindContext)ReturnsPropertyto be validated.ValidatorgetValidator()returnValidatorto do validationjava.util.Map<java.lang.String,java.lang.Object>getValidatorArgs()Returns an argument<tags, object>pairs map for validator.booleanhasValidator()Returns whether to do validation. which means, if true, than getValidator should not return nullvoidsave(BindContext bindContext)Save data from the source attribute into the target property.voidvalidate(ValidationContext vctx)do the validation by validator
-
-
-
Constructor Detail
-
ClientSavePropertyBindingImpl
public ClientSavePropertyBindingImpl(ClientBinder binder, Component comp, java.lang.String fieldName, Property property, java.lang.String validatorExpr, java.util.Map<java.lang.String,java.lang.Object> validatorArgs, java.util.Set<Property> properties)
-
-
Method Detail
-
save
public void save(BindContext bindContext)
Description copied from interface:SaveBindingSave data from the source attribute into the target property.- Specified by:
savein interfaceSaveBinding- Parameters:
bindContext- the binding runtime context
-
validate
public void validate(ValidationContext vctx)
Description copied from interface:SaveBindingdo the validation by validator- Specified by:
validatein interfaceSaveBinding
-
getValidate
public Property getValidate(BindContext bindContext)
Description copied from interface:SaveBindingReturnsPropertyto be validated.- Specified by:
getValidatein interfaceSaveBinding- Parameters:
bindContext- 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.
-
getValidator
public Validator getValidator()
Description copied from interface:SaveBindingreturnValidatorto do validation- Specified by:
getValidatorin interfaceSaveBinding- Returns:
- the validator if existed
-
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.
-
getBinder
public Binder getBinder()
Description copied from interface:BindingReturns the owner binder of this binding.
-
getComponent
public Component getComponent()
Description copied from interface:BindingReturns the associated component of this binding.- Specified by:
getComponentin interfaceBinding- Returns:
- the associated component of this binding.
-
getArgs
public java.util.Map<java.lang.String,java.lang.Object> getArgs()
Description copied from interface:BindingReturns an argument<tags, object>pairs map(read only).
-
getConverter
public Converter getConverter()
Description copied from interface:PropertyBindingReturns the associated _converter with this binding.- Specified by:
getConverterin interfacePropertyBinding- Returns:
- the associated _converter with this binding.
-
getFieldName
public java.lang.String getFieldName()
Description copied from interface:PropertyBindingReturns the field name of the source object.- Specified by:
getFieldNamein interfacePropertyBinding- Returns:
- the field name of the source object.
-
getCommandName
public java.lang.String getCommandName()
Description copied from interface:PropertyBindingReturns the associated command name of this binding; null if not speicified.- Specified by:
getCommandNamein interfacePropertyBinding- Returns:
- the associated command name of this binding; null if not speicified.
-
getPropertyString
public java.lang.String getPropertyString()
Description copied from interface:PropertyBindingReturns the property expression script of this binding.- Specified by:
getPropertyStringin interfacePropertyBinding- Returns:
- the property expression script of this binding.
-
getConditionType
public ConditionType getConditionType()
Description copied from interface:PropertyBindingReturns the condition type of this binding- Specified by:
getConditionTypein interfacePropertyBinding
-
getConverterArgs
public java.util.Map<java.lang.String,java.lang.Object> getConverterArgs()
Description copied from interface:PropertyBindingReturns an argument<tags, object>pairs map for converter.- Specified by:
getConverterArgsin interfacePropertyBinding- Returns:
- an argument
<tags, object>pairs map for converter.
-
getProperty
public ExpressionX getProperty()
- Specified by:
getPropertyin interfacePropertyBinding- Returns:
- the property expression of binding
-
getProperties
public java.util.Set<Property> getProperties()
-
-