Package org.zkoss.clientbind

## Class ClientSaveFormBindingImpl

- java.lang.Object
- - org.zkoss.clientbind.ClientSaveFormBindingImpl

- All Implemented Interfaces:
    `Binding`, `FormBinding`, `SaveBinding`, `SaveFormBinding`

      public class ClientSaveFormBindingImpl
      extends java.lang.Object
      implements SaveFormBinding

  Client save form binding implementation.
  Author:
    jameschu

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClientSaveFormBindingImpl​(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.Map formProps, java.lang.String formId)` |

  - ### 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).
    `Binder` | `getBinder()` | Returns the owner binder of this binding.
    `java.lang.String` | `getCommandName()` | Returns the associated command name of this binding; null if not specified.
    `Component` | `getComponent()` | Returns the associated component of this binding.
    `ConditionType` | `getConditionType()` | Returns the condition type of this binding
    `Converter` | `getConverter()` |
    `java.util.Map<java.lang.String,​java.lang.Object>` | `getConverterArgs()` |
    `ExpressionX` | `getFieldExpression​(BindEvaluatorX eval, java.lang.String field)` | Returns the field expression from the given field.
    `java.lang.String` | `getFieldName()` |
    `Form` | `getFormBean()` | Returns the implicit form associated with this form binding.
    `ExpressionX` | `getFormExpression​(BindEvaluatorX eval, java.lang.String field)` | Returns the form expression from the given field.
    `java.lang.String` | `getFormId()` | Returns the associated form id of this Binding.
    `ExpressionX` | `getProperty()` |
    `java.lang.String` | `getPropertyString()` | Returns the property expression script of this binding.
    `Property` | `getValidate​(BindContext bindContext)` | Returns `Property` to be validated.
    `java.util.Set<Property>` | `getValidates​(BindContext ctx)` | Returns `Property`s 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 `<tags, object>` pairs map for validator.
    `boolean` | `hasValidator()` | Returns whether to do validation. which means, if true, than getValidator should not return null
    `void` | `save​(BindContext bindContext)` | Save data from the source attribute into the target property.
    `void` | `validate​(ValidationContext vctx)` | do the validation by validator

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ClientSaveFormBindingImpl

          public ClientSaveFormBindingImpl​(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.Map formProps,
                                           java.lang.String formId)

  - ### Method Detail

    - #### save

          public void save​(BindContext bindContext)

      Description copied from interface: `SaveBinding`
      Save data from the source attribute into the target property.
      Specified by:
        `save` in interface `SaveBinding`
      Parameters:
        `bindContext` - the binding runtime context

    - #### validate

          public void validate​(ValidationContext vctx)

      Description copied from interface: `SaveBinding`
      do the validation by validator
      Specified by:
        `validate` in interface `SaveBinding`

    - #### getValidate

          public Property getValidate​(BindContext bindContext)

      Description copied from interface: `SaveBinding`
      Returns `Property` to be validated.
      Specified by:
        `getValidate` in interface `SaveBinding`
      Parameters:
        `bindContext` - 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.

    - #### 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

    - #### 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 interface `SaveBinding`
      Returns:
        an argument `<tags, object>` pairs map for validator.

    - #### getBinder

          public Binder getBinder()

      Description copied from interface: `Binding`
      Returns the owner binder of this binding.
      Specified by:
        `getBinder` in interface `Binding`
      Returns:
        the owner binder of this binding.

    - #### getComponent

          public Component getComponent()

      Description copied from interface: `Binding`
      Returns the associated component of this binding.
      Specified by:
        `getComponent` in interface `Binding`
      Returns:
        the associated component of this binding.

    - #### getArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getArgs()

      Description copied from interface: `Binding`
      Returns an argument `<tags, object>` pairs map(read only).
      Specified by:
        `getArgs` in interface `Binding`
      Returns:
        an argument `<tags, object>` pairs map(read only).

    - #### getConverter

          public Converter getConverter()

    - #### getFieldName

          public java.lang.String getFieldName()

    - #### getFormBean

          public Form getFormBean()

      Description copied from interface: `FormBinding`
      Returns the implicit form associated with this form binding.
      Specified by:
        `getFormBean` in interface `FormBinding`
      Returns:
        the implicit form associated with this form binding.

    - #### getFormId

          public java.lang.String getFormId()

      Description copied from interface: `FormBinding`
      Returns the associated form id of this Binding.
      Specified by:
        `getFormId` in interface `FormBinding`
      Returns:
        the associated attribute name of this component.

    - #### getCommandName

          public java.lang.String getCommandName()

      Description copied from interface: `FormBinding`
      Returns the associated command name of this binding; null if not specified.
      Specified by:
        `getCommandName` in interface `FormBinding`
      Returns:
        the associated command name of this binding; null if not specified.

    - #### getPropertyString

          public java.lang.String getPropertyString()

      Description copied from interface: `FormBinding`
      Returns the property expression script of this binding.
      Specified by:
        `getPropertyString` in interface `FormBinding`
      Returns:
        the property expression script of this binding.

    - #### getConditionType

          public ConditionType getConditionType()

      Description copied from interface: `FormBinding`
      Returns the condition type of this binding
      Specified by:
        `getConditionType` in interface `FormBinding`

    - #### getFieldExpression

          public ExpressionX getFieldExpression​(BindEvaluatorX eval,
                                                java.lang.String field)

      Description copied from interface: `FormBinding`
      Returns the field expression from the given field.
      Specified by:
        `getFieldExpression` in interface `FormBinding`

    - #### getFormExpression

          public ExpressionX getFormExpression​(BindEvaluatorX eval,
                                               java.lang.String field)

      Description copied from interface: `FormBinding`
      Returns the form expression from the given field.
      Specified by:
        `getFormExpression` in interface `FormBinding`

    - #### getConverterArgs

          public java.util.Map<java.lang.String,​java.lang.Object> getConverterArgs()

    - #### getProperty

          public ExpressionX getProperty()

    - #### getValidates

          public java.util.Set<Property> getValidates​(BindContext ctx)

      Description copied from interface: `SaveFormBinding`
      Returns `Property`s 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.