Package com.smartgwt.client.data
Class SimpleType.SimpleTypeValueUpdater
java.lang.Object
com.smartgwt.client.data.SimpleType.SimpleTypeValueUpdater
- Enclosing class:
- SimpleType
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract Object
updateAtomicValue
(Object atomicValue, Object currentValue) Method to update a live data value with an edited atomic value (such as a string or number).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).
-
Constructor Details
-
SimpleTypeValueUpdater
public SimpleTypeValueUpdater()
-
-
Method Details
-
updateAtomicValue
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
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. SeeSimpleType.SimpleTypeValueExtractor.getAtomicValue(java.lang.Object, java.lang.String)
for details of the reason strings used by the framework- Returns:
- Updated data value
-