namespace sap.ui.mdc.util.TypeUtil

Control sample: sap.ui.mdc.util.TypeUtil
Visiblity: restricted
Available since: N/A
Module: sap/ui/mdc/util/TypeUtil
Application Component: CA-UI5-MDC

Provides mapping functionality for model dependent data types to base types. Extend this object in your project to customize behaviour depending on model usage. Note: This utility is experimental and the API/behavior is not finalized and hence this should not be used for productive usage.


Nodes Overview

Node Description

Methods Overview

Method Description
sap.ui.mdc.util.TypeUtil.getBaseType

To know what control is rendered the Field or FilterField needs to know if the type represents a date, a number or something else in a normalized way.

As default string is returned.

sap.ui.mdc.util.TypeUtil.getDataTypeClass

Returns a dataType class based on given object path, formatoptions and constraints

sap.ui.mdc.util.TypeUtil.getDataTypeInstance

Returns a dataType instance based on given object path, formatoptions and constraints

sap.ui.mdc.util.TypeUtil.getTypeConfig

returns a type mapping configuration object for a given type string or simpleType

sap.ui.mdc.util.TypeUtil.getBaseType

To know what control is rendered the Field or FilterField needs to know if the type represents a date, a number or something else in a normalized way.

As default string is returned.

Param Type DefaultValue Description
vType string

Given type string or sap.ui.model.SimpleType

oFormatOptions object

Used FormatOptions

oConstraints object

Used Constraints

sap.ui.mdc.util.TypeUtil.getDataTypeClass

Returns a dataType class based on given object path, formatoptions and constraints

Param Type DefaultValue Description
sDataType string

Class path as string where each name is separated by '.'

sap.ui.mdc.util.TypeUtil.getDataTypeInstance

Returns a dataType instance based on given object path, formatoptions and constraints

Param Type DefaultValue Description
sDataType string

Class path as string where each name is separated by '.'

formatOptions object

formatOptions for the dataType

constraints object

constraints for the dataType

sap.ui.mdc.util.TypeUtil.getTypeConfig

returns a type mapping configuration object for a given type string or simpleType

Param Type DefaultValue Description
vType string sap.ui.model.SimpleType

Given dataType as string or type