class sap.ui.mdc.field.FieldBaseDelegate

Visiblity: restricted
UX Guidelines:
Implements:
Available since: N/A
Extends:
Module: sap/ui/mdc/field/FieldBaseDelegate
Application Component: CA-UI5-MDC

Delegate class for sap.ui.mdc.field.FieldBase.
Note: The class is experimental and the API/behavior is not finalized and hence this should not be used for productive usage.


Constructor

new sap.ui.mdc.field.FieldBaseDelegate()

Methods Overview

Method Description
sap.ui.mdc.field.FieldBaseDelegate.enhanceValueForUnit

This function enhances the value with unit or currency information if needed by the data type.

sap.ui.mdc.field.FieldBaseDelegate.getDefaultFieldHelpBaseDelegate

This function returns which FieldHelpBaseDelegate is used if a default field help (for example, for Boolean values) is created.

sap.ui.mdc.field.FieldBaseDelegate.getDefaultFieldValueHelpDelegate

This function returns which FieldValueHelpDelegate is used if a default field help (for example, for defining conditions in FilterField) is created.

sap.ui.mdc.field.FieldBaseDelegate.getDescription

Determines the description for a given key.

This function is called while formatting the output of a Field or FilterField control in case a description is to be displayed but only a key is given.

If this needs to be determined asynchronously, a Promise is returned.

As the key might change (uppercase), an object with key and description can be returned.

If the description cannot be determined, a corresponding FormatException is thrown.

sap.ui.mdc.field.FieldBaseDelegate.getItemForValue

Determines the key, description, and the in and out parameters of a user input.

If this needs to be determined asynchronously, a Promise is returned.

The result needs to be an object containing the following properties: description, key, and in and out parameters.

  • key: Key of the item
  • description: Description of the item
  • inParameters: Object with in parameters and the corresponding value
  • outParameters: Object with out parameters and the corresponding value

If the item cannot be determined, a corresponding ParseException is thrown.

sap.ui.mdc.field.FieldBaseDelegate.initializeInternalUnitType

This function initializes the unit type. If the Field control is used, the used data type might come from the binding. If the type is a V4 unit or currency, it might need to be formatted once.

sap.ui.mdc.field.FieldBaseDelegate.initializeTypeFromBinding

If the Field control is used, the used data type might come from the binding. In V4-unit or currency case it might need to be formatted once. To initialize the internal type later on, the currencies must be returned.

sap.ui.mdc.field.FieldBaseDelegate.isInputValidationEnabled

Defines if the input of the Field or FilterField control is checked to determine the key and description.

sap.ui.mdc.field.FieldBaseDelegate.isInvalidInputAllowed

Defines if the input of the Field or FilterField control that is not found in the field help or custom logic is accepted.

sap.ui.mdc.field.FieldBaseDelegate.enhanceValueForUnit

This function enhances the value with unit or currency information if needed by the data type.

Param Type DefaultValue Description
oPayload object

Payload for delegate

aValues any[]

Value

oTypeInitialization object

Information needed to initialize internal type

sap.ui.mdc.field.FieldBaseDelegate.getDefaultFieldHelpBaseDelegate

This function returns which FieldHelpBaseDelegate is used if a default field help (for example, for Boolean values) is created.

Param Type DefaultValue Description
oPayload object

Payload for delegate

sap.ui.mdc.field.FieldBaseDelegate.getDefaultFieldValueHelpDelegate

This function returns which FieldValueHelpDelegate is used if a default field help (for example, for defining conditions in FilterField) is created.

Param Type DefaultValue Description
oPayload object

Payload for delegate

sap.ui.mdc.field.FieldBaseDelegate.getDescription

Determines the description for a given key.

This function is called while formatting the output of a Field or FilterField control in case a description is to be displayed but only a key is given.

If this needs to be determined asynchronously, a Promise is returned.

As the key might change (uppercase), an object with key and description can be returned.

If the description cannot be determined, a corresponding FormatException is thrown.

Param Type DefaultValue Description
oPayload object

Payload for delegate

oFieldHelp sap.ui.mdc.field.FieldHelpBase

Field help assigned to the Field or FilterField control

vKey any

Key

oInParameters object

In parameters for the key (as a key must not be unique.)

oOutParameters object

Out parameters for the key (as a key must not be unique.)

oBindingContext sap.ui.model.Context

BindingContext of the checked field. Inside a table the FieldHelp element might be connected to a different row.

oConditionModel sap.ui.mdc.condition.ConditionModel

ConditionModel, if bound to one

sConditionModelName string

Name of the ConditionModel, if bound to one

sap.ui.mdc.field.FieldBaseDelegate.getItemForValue

Determines the key, description, and the in and out parameters of a user input.

If this needs to be determined asynchronously, a Promise is returned.

The result needs to be an object containing the following properties: description, key, and in and out parameters.

  • key: Key of the item
  • description: Description of the item
  • inParameters: Object with in parameters and the corresponding value
  • outParameters: Object with out parameters and the corresponding value

If the item cannot be determined, a corresponding ParseException is thrown.

Param Type DefaultValue Description
oPayload object

Payload for delegate

oFieldHelp sap.ui.mdc.field.FieldHelpBase

Field help assigned to the Field or FilterField control

vValue any

Value as entered by user

vParsedValue any

Value parsed by data type to fit the data type of the key

oBindingContext sap.ui.model.Context

BindingContext of the checked field. Inside a table the FieldHelp element might be connected to a different row.

bCheckKeyFirst boolean

If set, it first should be checked if the value fits a key

bCheckKey boolean

If set, it should be checked if there is an item with the given key. This is set to false if the value cannot be a valid key because of type validation.

bCheckDescription boolean

If set, it should be checked if there is an item with the given description. This is set to false if only the key is used in the field.

oConditionModel sap.ui.mdc.condition.ConditionModel

ConditionModel, if bound to one

sConditionModelName string

Name of the ConditionModel, if bound to one

sap.ui.mdc.field.FieldBaseDelegate.initializeInternalUnitType

This function initializes the unit type. If the Field control is used, the used data type might come from the binding. If the type is a V4 unit or currency, it might need to be formatted once.

Param Type DefaultValue Description
oPayload object

Payload for delegate

oType sap.ui.model.SimpleType

Type from binding

oTypeInitialization object

Information needed to initialize internal type

sap.ui.mdc.field.FieldBaseDelegate.initializeTypeFromBinding

If the Field control is used, the used data type might come from the binding. In V4-unit or currency case it might need to be formatted once. To initialize the internal type later on, the currencies must be returned.

Param Type DefaultValue Description
oPayload object

Payload for delegate

oType sap.ui.model.SimpleType

Type from binding

vValue any

Given value

sap.ui.mdc.field.FieldBaseDelegate.isInputValidationEnabled

Defines if the input of the Field or FilterField control is checked to determine the key and description.

Param Type DefaultValue Description
oPayload object

Payload for delegate

oFieldHelp sap.ui.mdc.field.FieldHelpBase

Field help assigned to the Field or FilterField control

sap.ui.mdc.field.FieldBaseDelegate.isInvalidInputAllowed

Defines if the input of the Field or FilterField control that is not found in the field help or custom logic is accepted.

Param Type DefaultValue Description
oPayload object

Payload for delegate

oFieldHelp sap.ui.mdc.field.FieldHelpBase

Field help assigned to the Field or FilterField control