Class SimpleType.SimpleTypeValueUpdater

java.lang.Object
com.smartgwt.client.data.SimpleType.SimpleTypeValueUpdater
Enclosing class:
SimpleType

public abstract static class SimpleType.SimpleTypeValueUpdater extends Object
  • Constructor Details

    • SimpleTypeValueUpdater

      public SimpleTypeValueUpdater()
  • Method Details

    • updateAtomicValue

      public abstract Object updateAtomicValue(Object atomicValue, 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 Object updateAtomicValue(Object atomicValue, Object currentValue, 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. See SimpleType.SimpleTypeValueExtractor.getAtomicValue(java.lang.Object, java.lang.String) for details of the reason strings used by the framework
      Returns:
      Updated data value