Abstract Class sap.ui.model.SimpleTypeModule: sap/ui/model/SimpleType
This is an abstract base class for simple types.
Constructor Summary
Method Summary
sap.ui.model.SimpleType.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.model.SimpleType with name
sClassName
and enriches it with the information contained in oClassInfo
.formatValue(oValue, sInternalType)Format the given value in model representation to an output value in the given internal type.
parseValue(oValue, sInternalType)Parse a value of an internal type to the expected value of the model type.
validateValue(oValue)Validate whether a given value in model representation is valid and meets the defined constraints (if any).
Methods borrowed from class sap.ui.model.Type
Methods borrowed from class sap.ui.base.Object
Constructor Detail
Method Detail
sap.ui.model.SimpleType.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.model.SimpleType with name
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of information as described in sap.ui.model.Type.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
sap.ui.model.SimpleType.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.model.SimpleType.
Returns:
{sap.ui.base.Metadata} | Metadata object describing this class |
formatValue(oValue, sInternalType): any
Format the given value in model representation to an output value in the given internal type. This happens according to the format options, if target type is 'string'. If oValue is not defined or null, null will be returned.
Parameters:
{any} | oValue | the value to be formatted |
{string} | sInternalType | the target type |
Returns:
{any} | the formatted output value |