namespace sap.ui.mdc.field

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

Nodes Overview

Node Description
sap.ui.mdc.field.BoolFieldHelp

A field help used in the FieldHelp association in FieldBase controls that shows a list for Boolean values.

sap.ui.mdc.field.ConditionFieldHelp

A field help used in the FieldHelp association in FieldBase controls to show a popover of conditions.

sap.ui.mdc.field.ConditionsType

This class represents a type that is used to map an array of conditions to a single-value control (such as Input or Text control).

sap.ui.mdc.field.ConditionType

This class represents a type that is used to map a single condition to a single-value control

sap.ui.mdc.field.CustomFieldHelp

A field help used in the FieldHelp association in FieldBase controls that allows you to add custom content.

sap.ui.mdc.field.CustomFieldInfo

A field help used in the FieldInfo aggregation in FieldBase controls that allows you to add custom content.

sap.ui.mdc.field.DefineConditionPanel

A DefineConditionPanel control is used inside the ValueHelpPanel control to enter different types of conditions.

sap.ui.mdc.field.FieldBase

The FieldBase control is the basic control to be used within the Field and FilterField controls.

sap.ui.mdc.field.FieldBaseDelegate

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.

sap.ui.mdc.field.FieldHelpBase

Base type for the FieldHelp association in the FieldBase controls.

sap.ui.mdc.field.FieldHelpBaseDelegate

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

sap.ui.mdc.field.FieldHelpItem

Item object type.

sap.ui.mdc.field.FieldInfoBase

A FieldInfoBase element is a base class that shows any kind of information related to the Field control, for example, navigation targets or contact details.

sap.ui.mdc.field.FieldInput

The FieldInput control is used to render an input field inside a control based on FieldBase.

sap.ui.mdc.field.FieldMultiInput

The FieldMultiInput control is used to render a multi-input field inside a control based on FieldBase.

sap.ui.mdc.field.FieldValueHelp

A field help used in the FieldHelp association of controls based on FieldBase that shows a value help dialog.

sap.ui.mdc.field.FieldValueHelpContentWrapperBase

Base type for FieldValueHelp content control wrapper.

sap.ui.mdc.field.FieldValueHelpDelegate

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

sap.ui.mdc.field.FieldValueHelpMdcTableWrapper

Wrapper to use a sap.m.Table control as content of a FieldValueHelp element

sap.ui.mdc.field.FieldValueHelpMTableWrapper

Wrapper to use a sap.m.Table control as content of a FieldValueHelp element

sap.ui.mdc.field.FieldValueHelpUITableWrapper

Wrapper to use a sap.m.Table control as content of a FieldValueHelp element

sap.ui.mdc.field.InParameter

The InParameter element is used in the FieldValueHelp element.

sap.ui.mdc.field.ListFieldHelp

A field help used in the FieldHelp association of controls based on FieldBase that shows a list of items.

sap.ui.mdc.field.ListFieldHelpItem

An item that is used in the ListFieldHelp element if grouping is needed.

sap.ui.mdc.field.MultiValueFieldDelegate

Delegate class for sap.ui.mdc.MultiValueField.

sap.ui.mdc.field.MultiValueFieldItem

Base type for MultiValueFieldItem control.

sap.ui.mdc.field.OutParameter

The OutParameter element is used in the FieldValueHelp element.

sap.ui.mdc.field.ValueHelpPanel

A ValueHelpPanel control is used inside the FieldValueHelp element to show a complex dialog for entering multiple kinds of conditions.


Methods Overview

Method Description

Indicates that user input is required.

Visibility: public showEmptyIndicator boolean false

If set, an empty Field renders an empty-indicator in display mode.

This property only takes effect if editMode is set to Display.

Note Empty means the Field holds no value. If an empty string is a valid value, the Field might show nothing, depending on the display settings and assigned description or FieldHelp.

Since: 1.85.0.

Visibility: public textAlign sap.ui.core.TextAlign Initial

Defines the horizontal alignment of the text that is shown inside the input field.

Note: If the rendered control doesn't support this feature, this property is ignored.

Visibility: public textDirection sap.ui.core.TextDirection Inherit

Defines the text directionality of the input field, for example RTL, LTR.

Note: If the rendered control doesn't support this feature, this property is ignored.

Visibility: public valueState sap.ui.core.ValueState None

Visualizes the validation state of the control, for example Error, Warning, Success.

Note: The visualization of the ValueState property is handled by the inner rendered control. If a control is set (using content, contentEdit, or contentDisplay), this control needs to support the valueState behavior, otherwise valueState is not visualized.

Visibility: public valueStateText string

Defines the text that appears in the value state message pop-up. If this has not specified, a default text from the resource bundle is shown.

Visibility: public width sap.ui.core.CSSSize

Defines the width of the control.

Visibility: public delegate object

Path to the Delegate module that provides the required APIs to execute model-specific logic.
Note: Ensure that the related file can be requested (any required library has to be loaded before that).
Do not bind or modify the module. This property can only be configured during control initialization.

Visibility: public

Borrowed Aggregations

Name Cardinality Type Description
content 0..1 sap.ui.core.Control

Optional content that can be rendered.

Note: Bind the value-holding property of the control to '$field>/conditions' using ConditionsType as type.

If the control needs to show multiple conditions, bind its aggregation to '$field>/conditions'. Bind the item controls value-holding property using ConditionType as type.

Warning: Only controls allowed in a Form are allowed to be used for this optional content. Other controls might break the layout. This means the IFormContent interface needs to be implemented by these controls.

contentDisplay 0..1 sap.ui.core.Control

Optional content to be rendered if the editMode property is set to Display.

Note: If a control is assigned to the content aggregation, this one is ignored.

Note: Bind the value-holding property of the control to '$field>/conditions' using ConditionsType as type.

If the control needs to show multiple conditions, bind its aggregation to '$field>/conditions'. Bind the item controls value-holding property using ConditionType as type.

Warning: Only controls allowed in a Form are allowed to be used for this optional content. Other controls might break the layout. This means the IFormContent interface needs to be implemented by these controls.

Since: 1.61.0.

contentEdit 0..1 sap.ui.core.Control

Optional content to be rendered if the editMode property is not set to Display.

Note: If a control is assigned to the content aggregation, this one is ignored.

Note: Bind the value-holding property of the control to '$field>/conditions' using ConditionsType as type.

If the control needs to show multiple conditions, bind its aggregation to '$field>/conditions'. Bind the item controls value-holding property using ConditionType as type.

Warning: Only controls allowed in a Form are allowed to be used for this optional content. Other controls might break the layout. This means the IFormContent interface needs to be implemented by these controls.

Since: 1.61.0.

fieldInfo 0..1 sap.ui.mdc.field.FieldInfoBase

Optional FieldInfo used for detail information. This is only active in display mode.

Note: If a special data type is defined or a content control is set, this is ignored.


Events Overview

Event Description
change

This event is fired when the value property of the field is changed by user interaction.

Note This event is only triggered if the used content control has a change event.

change

This event is fired when the value property of the field is changed by user interaction.

Note This event is only triggered if the used content control has a change event.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
value string

The new value of the Field.

If a FieldHelp is assigned to the Field, the value is used as key for the FieldHelp items.

valid boolean

Flag that indicates if the entered value is valid

promise Promise

Returns a Promise for the change. The Promise returns the value if it is resolved. If the change event is synchronous, the promise has already been already resolved. If it is asynchronous, it will be resolved after the value has been updated.

The Field should be set to busy during the parsing to prevent user input. As there might be a whole group of fields that needs to be busy, this cannot be done automatically.

Since: 1.69.0.


Methods Overview

Method Description
attachChange

Attaches event handler fnFunction to the change event of this sap.ui.mdc.Field.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.mdc.Field itself.

This event is fired when the value property of the field is changed by user interaction.

Note This event is only triggered if the used content control has a change event.

detachChange

Detaches event handler fnFunction from the change event of this sap.ui.mdc.Field.

The passed function and listener object must match the ones used for event registration.

sap.ui.mdc.Field.extend

Creates a new subclass of class sap.ui.mdc.Field 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.mdc.field.FieldBase.extend.

fireChange

Fires event change to attached listeners.

getAdditionalValue

Gets current value of property additionalValue.

The additional value of the field.

To display the key and the description in one field, the description must be set on the additionalValue property.

getConditions

Gets conditions of the property conditions.

Do not use the conditions property, use the value and additionalValue properties instead.

Since Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
getDataType

Gets a new value for property dataType.

The type of data handled by the field. The type is used to parse, format, and validate the value.

Note: If the value property is bound to a model using a type, this type is used. In this case the value of the dataType property is ignored.

Since Not supported, the type in the binding to the <code>value</code> property is used.
getDataTypeConstraints

Gets a new value for property dataTypeConstraints.

The constraints of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeConstraints property are ignored.

Since Not supported, the <code>Constraints</code> of the type in the binding to the <code>value</code> property is used.
getDataTypeFormatOptions

Gets a new value for property dataTypeFormatOptions.

The format options of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeFormatOptions property are ignored.

Since Not supported, the <code>FormatOptions</code> of the type in the binding to the <code>value</code> property is used.
sap.ui.mdc.Field.getMetadata

Returns a metadata object for class sap.ui.mdc.Field.

getValue

Gets current value of property value.

The value of the field.

To display the key and the description in one field, the key must be set on the value property.

setAdditionalValue

Sets a new value for property additionalValue.

The additional value of the field.

To display the key and the description in one field, the description must be set on the additionalValue property.

When called with a value of null or undefined, the default value of the property will be restored.

setConditions

Sets conditions to the property conditions.

Do not use the conditions property, use the value and additionalValue properties instead.

Since Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
setDataType

Sets a new value for property dataType.

The type of data handled by the field. The type is used to parse, format, and validate the value.

Note: If the value property is bound to a model using a type, this type is used. In this case the value of the dataType property is ignored.

Since Not supported, the type in the binding to the <code>value</code> property is used.
setDataTypeConstraints

Sets a new value for property dataTypeConstraints.

The constraints of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeConstraints property are ignored.

Since Not supported, the <code>Constraints</code> of the type in the binding to the <code>value</code> property is used.
setDataTypeFormatOptions

Sets a new value for property dataTypeFormatOptions.

The format options of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeFormatOptions property are ignored.

Since Not supported, the <code>FormatOptions</code> of the type in the binding to the <code>value</code> property is used.
setMaxConditions

This property must not be set for the Field

Since Not supported, this property is not supported for the <code>Field</code>.
setValue

Sets a new value for property value.

The value of the field.

To display the key and the description in one field, the key must be set on the value property.

When called with a value of null or undefined, the default value of the property will be restored.

attachChange

Attaches event handler fnFunction to the change event of this sap.ui.mdc.Field.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.mdc.Field itself.

This event is fired when the value property of the field is changed by user interaction.

Note This event is only triggered if the used content control has a change event.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.mdc.Field itself

detachChange

Detaches event handler fnFunction from the change event of this sap.ui.mdc.Field.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.mdc.Field.extend

Creates a new subclass of class sap.ui.mdc.Field 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.mdc.field.FieldBase.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

fireChange

Fires event change to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

value string

The new value of the Field.

If a FieldHelp is assigned to the Field, the value is used as key for the FieldHelp items.

valid boolean

Flag that indicates if the entered value is valid

promise Promise

Returns a Promise for the change. The Promise returns the value if it is resolved. If the change event is synchronous, the promise has already been already resolved. If it is asynchronous, it will be resolved after the value has been updated.

The Field should be set to busy during the parsing to prevent user input. As there might be a whole group of fields that needs to be busy, this cannot be done automatically.

getAdditionalValue

Gets current value of property additionalValue.

The additional value of the field.

To display the key and the description in one field, the description must be set on the additionalValue property.

getConditions

Gets conditions of the property conditions.

Do not use the conditions property, use the value and additionalValue properties instead.

Since Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.

getDataType

Gets a new value for property dataType.

The type of data handled by the field. The type is used to parse, format, and validate the value.

Note: If the value property is bound to a model using a type, this type is used. In this case the value of the dataType property is ignored.

Since Not supported, the type in the binding to the <code>value</code> property is used.
Param Type DefaultValue Description
sDataType string

DataType to be set

getDataTypeConstraints

Gets a new value for property dataTypeConstraints.

The constraints of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeConstraints property are ignored.

Since Not supported, the <code>Constraints</code> of the type in the binding to the <code>value</code> property is used.
Param Type DefaultValue Description
oDataTypeConstraints string

Constraints to be set

getDataTypeFormatOptions

Gets a new value for property dataTypeFormatOptions.

The format options of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeFormatOptions property are ignored.

Since Not supported, the <code>FormatOptions</code> of the type in the binding to the <code>value</code> property is used.
Param Type DefaultValue Description
oDataTypeFormatOptions string

Format options to be set

sap.ui.mdc.Field.getMetadata

Returns a metadata object for class sap.ui.mdc.Field.

getValue

Gets current value of property value.

The value of the field.

To display the key and the description in one field, the key must be set on the value property.

setAdditionalValue

Sets a new value for property additionalValue.

The additional value of the field.

To display the key and the description in one field, the description must be set on the additionalValue property.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oAdditionalValue any

New value for property additionalValue

setConditions

Sets conditions to the property conditions.

Do not use the conditions property, use the value and additionalValue properties instead.

Since Not supported, use the <code>value</code> property and <code>additionalValue</code> property to bind the control.
Param Type DefaultValue Description
aConditions object[]

Conditions to be set

setDataType

Sets a new value for property dataType.

The type of data handled by the field. The type is used to parse, format, and validate the value.

Note: If the value property is bound to a model using a type, this type is used. In this case the value of the dataType property is ignored.

Since Not supported, the type in the binding to the <code>value</code> property is used.
Param Type DefaultValue Description
sDataType string

DataType to be set

setDataTypeConstraints

Sets a new value for property dataTypeConstraints.

The constraints of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeConstraints property are ignored.

Since Not supported, the <code>Constraints</code> of the type in the binding to the <code>value</code> property is used.
Param Type DefaultValue Description
oDataTypeConstraints string

Constraints to be set

setDataTypeFormatOptions

Sets a new value for property dataTypeFormatOptions.

The format options of the type specified in dataType.

Note: If the value property is bound to a model using a type, this type is used. In this case the values of the dataType property and the dataTypeFormatOptions property are ignored.

Since Not supported, the <code>FormatOptions</code> of the type in the binding to the <code>value</code> property is used.
Param Type DefaultValue Description
oDataTypeFormatOptions string

Format options to be set

setMaxConditions

This property must not be set for the Field

Since Not supported, this property is not supported for the <code>Field</code>.
Param Type DefaultValue Description
iMaxConditions int

Only 1 condition allowed in Field

setValue

Sets a new value for property value.

The value of the field.

To display the key and the description in one field, the key must be set on the value property.

When called with a value of null or undefined, the default value of the property will be restored.

Param Type DefaultValue Description
oValue any

New value for property value