com.smartgwt.client.data

## Class SimpleType.SimpleTypeValueUpdater

- java.lang.Object
- - com.smartgwt.client.data.SimpleType.SimpleTypeValueUpdater

- Enclosing class:
    SimpleType

      public abstract static class SimpleType.SimpleTypeValueUpdater
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleType.SimpleTypeValueUpdater()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `abstract java.lang.Object` | `updateAtomicValue(java.lang.Object atomicValue, java.lang.Object currentValue)` Method to update a live data value with an edited atomic value (such as a string or number).
    `java.lang.Object` | `updateAtomicValue(java.lang.Object atomicValue, java.lang.Object currentValue, java.lang.String reason)` Method to uodate a live data value with an edited atomic value atomic value (such as a string or number).

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

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

- - ### Constructor Detail

    - #### SimpleType.SimpleTypeValueUpdater

          public SimpleType.SimpleTypeValueUpdater()

  - ### Method Detail

    - #### updateAtomicValue

          public abstract java.lang.Object updateAtomicValue(java.lang.Object atomicValue,
                                           java.lang.Object currentValue)

      Method to update a live data value with an edited atomic value (such as a string or number). This method will be called when the user edits data in a field of this type, allowing the developer to convert from the atomic type to a raw data value for storage.
      Parameters:
        `atomicValue` - (any) New atomic value. This should match the underlying atomic type specified by the `#inheritsFrom` attribute.
        `currentValue` - Existing data value to be updated.
      Returns:
        (any) Updated data value.

    - #### updateAtomicValue

          public java.lang.Object updateAtomicValue(java.lang.Object atomicValue,
                                           java.lang.Object currentValue,
                                           java.lang.String reason)

      Method to uodate a live data value with an edited atomic value atomic value (such as a string or number). This method will be called when the user edits data in a field of this type, allowing the developer to convert from the atomic type to a raw data value for storage. Note, you only need to override this method if you have a need for the additional context provided by the "reason" attribute. The default implementation just ignores the reason and calls the two-param version of updateAtomicValue().
      Parameters:
        `atomicValue` - (any) New atomic value. This should match the underlying atomic type specified by the `#inheritsFrom` attribute.
        `value` - Raw data value to convert. Typically this would be a field value for some record.
        `reason` - A string passed by the framework to indicate why it is updating the atomic value.
      Returns:
        Updated data value