abstract class sap.ui.mdc.field.FieldValueHelpContentWrapperBase

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

Base type for FieldValueHelp content control wrapper.


Constructor

Constructor for a new FieldValueHelpContentWrapperBase.

The FieldValueHelp element supports different types of content. To map the content control API to the FieldValueHelp element, a wrapper is needed. This base class just defines the API.

Note: All events and functions must only be used by the corresponding field help.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.mdc.field.FieldValueHelpContentWrapperBase(sId?, mSettings?)
Param Type Default Value Description
sId? string

ID for the new control, generated automatically if no ID is given

mSettings? object

Initial settings for the new control


Properties

Name Type Default Value Description
selectedItems object[]

The selected items.

An item is an object with the properties key, description, inParameters and outParameters.

Note: This property must only be set by the FieldValueHelp element, not by the application.

Visibility: public

Events Overview

Event Description
dataUpdate

This event is fired when the data of the field help is changed.

This is needed for the FieldValueHelp element to update the popup or dialog. This might be needed to trigger an update for formatting a key with its description in the connected field.

navigate

This event is fired when content is navigated.

selectionChange

This event is fired after a selection has been changed.

dataUpdate

This event is fired when the data of the field help is changed.

This is needed for the FieldValueHelp element to update the popup or dialog. This might be needed to trigger an update for formatting a key with its description in the connected field.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
contentChange boolean

If set, the content control has changed. If not set, only the data has changed

navigate

This event is fired when content is navigated.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
key any

The navigated key

description string

The navigated description

leave boolean

true if there is navigation away from content (for example, from a table)

In this case the field should get the focus.

disableFocus boolean

Disable initial popover focus

itemId string

The ID of the navigated item

This is the DOM reference needed for ARIA support to point to the navigated item.

Since: 1.81.0.

selectionChange

This event is fired after a selection has been changed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
selectedItems object[]

Array of selected items

Each item is represented as an object with the properties key, description, inParameters and outParameters.

itemPress boolean

Indicator of item is chosen via press or enter or via a selection

Depending of the field help logic the field help needs to be closed on click, but not on multi-selection. (If a Table is used, clicking an item in the suggestion closes it bit activation the check box not.)

since: 1.76.0


Methods Overview

Method Description
applyFilters

Applies the entered filters and search string to the content control (table).

As the way how filters and search are applied depends on the ListBinding and the used content control, this needs to be done in the wrapper.

If the ListBinding in the wrapper is suspended, it must be resumed in this function after setting the filters. It will not be resumed in the FieldValueHelp element. There applyFilters is only called if the filters should really be set.

attachDataUpdate

Attaches event handler fnFunction to the dataUpdate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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.FieldValueHelpContentWrapperBase itself.

This event is fired when the data of the field help is changed.

This is needed for the FieldValueHelp element to update the popup or dialog. This might be needed to trigger an update for formatting a key with its description in the connected field.

attachNavigate

Attaches event handler fnFunction to the navigate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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.FieldValueHelpContentWrapperBase itself.

This event is fired when content is navigated.

attachSelectionChange

Attaches event handler fnFunction to the selectionChange event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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.FieldValueHelpContentWrapperBase itself.

This event is fired after a selection has been changed.

detachDataUpdate

Detaches event handler fnFunction from the dataUpdate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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

detachNavigate

Detaches event handler fnFunction from the navigate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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

detachSelectionChange

Detaches event handler fnFunction from the selectionChange event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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

dispose

Disposes the wrapper. This method should clean up entities created during initialize

enableShowAllItems

Checks if a ShoWAllItems-Footer should be created in the suggestion popover which will be shown if further selectable items are available.

sap.ui.mdc.field.FieldValueHelpContentWrapperBase.extend

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

fieldHelpClose

This function is called if the field help is closed.

fieldHelpOpen

This function is called if the field help is opened. Here the wrapper can focus on the selected item or do similar things.

fireDataUpdate

Fires event dataUpdate to attached listeners.

fireNavigate

Fires event navigate to attached listeners.

fireSelectionChange

Fires event selectionChange to attached listeners.

getAllItemsShown

Checks if the shown content currently displays all relevant values

getAsyncKeyText

Checks if the field help supports asynchronous loading for getKeyForText and getTextForKey.

If skey or description can be loaded asynchronously, it doesn't depend on the content of the table or filtering. So in this case no dataUpdate event for the field is needed.

getDialogContent

Returns the content shown in the value help dialog.

getFilterEnabled

Returns true if filtering of the content is supported.

getKeyAndText

Determines the key for a given description.

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

getKeyForText

Determines the key for an given description.

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

getListBinding

Returns the ListBinding used for the field help.

sap.ui.mdc.field.FieldValueHelpContentWrapperBase.getMetadata

Returns a metadata object for class sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

getSelectedItems

Gets current value of property selectedItems.

The selected items.

An item is an object with the properties key, description, inParameters and outParameters.

Note: This property must only be set by the FieldValueHelp element, not by the application.

Default value is [].

getSuggestionContent

Returns the content shown in the value help suggestion popup.

getTextForKey

Determines the description for n given key.

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

initialize

Initializes the wrapper. This is called if the FieldValueHelp element is opened. Here modules should be loaded that are only needed if the help is open.

isSuspended

Checks if the ListBinding of the wrapper has been suspended.

navigate

Triggers navigation of the content.

removeFocus

The focus visualization of the table needs to be removed as the user starts typing into the field.

setSelectedItems

Sets a new value for property selectedItems.

The selected items.

An item is an object with the properties key, description, inParameters and outParameters.

Note: This property must only be set by the FieldValueHelp element, not by the application.

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

Default value is [].

applyFilters

Applies the entered filters and search string to the content control (table).

As the way how filters and search are applied depends on the ListBinding and the used content control, this needs to be done in the wrapper.

If the ListBinding in the wrapper is suspended, it must be resumed in this function after setting the filters. It will not be resumed in the FieldValueHelp element. There applyFilters is only called if the filters should really be set.

Param Type DefaultValue Description
aFilters sap.ui.model.Filter[]

Filter objects

sSearch string

Search string (for $search request)

attachDataUpdate

Attaches event handler fnFunction to the dataUpdate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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.FieldValueHelpContentWrapperBase itself.

This event is fired when the data of the field help is changed.

This is needed for the FieldValueHelp element to update the popup or dialog. This might be needed to trigger an update for formatting a key with its description in the connected field.

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.FieldValueHelpContentWrapperBase itself

attachNavigate

Attaches event handler fnFunction to the navigate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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.FieldValueHelpContentWrapperBase itself.

This event is fired when content is navigated.

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.FieldValueHelpContentWrapperBase itself

attachSelectionChange

Attaches event handler fnFunction to the selectionChange event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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.FieldValueHelpContentWrapperBase itself.

This event is fired after a selection has been changed.

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.FieldValueHelpContentWrapperBase itself

detachDataUpdate

Detaches event handler fnFunction from the dataUpdate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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

detachNavigate

Detaches event handler fnFunction from the navigate event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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

detachSelectionChange

Detaches event handler fnFunction from the selectionChange event of this sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

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

dispose

Disposes the wrapper. This method should clean up entities created during initialize

Param Type DefaultValue Description
bSuggestion boolean

Flag if field help is opened as suggestion or dialog

enableShowAllItems

Checks if a ShoWAllItems-Footer should be created in the suggestion popover which will be shown if further selectable items are available.

sap.ui.mdc.field.FieldValueHelpContentWrapperBase.extend

Creates a new subclass of class sap.ui.mdc.field.FieldValueHelpContentWrapperBase 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.core.Element.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

fieldHelpClose

This function is called if the field help is closed.

fieldHelpOpen

This function is called if the field help is opened. Here the wrapper can focus on the selected item or do similar things.

Param Type DefaultValue Description
bSuggestion boolean

Flag if field help is opened as suggestion or dialog

fireDataUpdate

Fires event dataUpdate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

contentChange boolean

If set, the content control has changed. If not set, only the data has changed

fireNavigate

Fires event navigate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

key any

The navigated key

description string

The navigated description

leave boolean

true if there is navigation away from content (for example, from a table)

In this case the field should get the focus.

disableFocus boolean

Disable initial popover focus

itemId string

The ID of the navigated item

This is the DOM reference needed for ARIA support to point to the navigated item.

fireSelectionChange

Fires event selectionChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

selectedItems object[]

Array of selected items

Each item is represented as an object with the properties key, description, inParameters and outParameters.

itemPress boolean

Indicator of item is chosen via press or enter or via a selection

Depending of the field help logic the field help needs to be closed on click, but not on multi-selection. (If a Table is used, clicking an item in the suggestion closes it bit activation the check box not.)

since: 1.76.0

getAllItemsShown

Checks if the shown content currently displays all relevant values

getAsyncKeyText

Checks if the field help supports asynchronous loading for getKeyForText and getTextForKey.

If skey or description can be loaded asynchronously, it doesn't depend on the content of the table or filtering. So in this case no dataUpdate event for the field is needed.

getDialogContent

Returns the content shown in the value help dialog.

getFilterEnabled

Returns true if filtering of the content is supported.

getKeyAndText

Determines the key for a given description.

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

Param Type DefaultValue Description
vKey any

Parsed value used for key determination

sText string

Description

oInParameters object

In parameters for the key (as a key does not have to be unique.)

oOutParameters object

Out parameters for the key (as a key does not have to be unique.)

bCaseSensitive boolean

If true, the filtering is case-sensitive

getKeyForText

Determines the key for an given description.

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

Param Type DefaultValue Description
sText string

Description

oInParameters sap.ui.model.Filter

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

bNoRequest boolean

If true, the check must be only done on existing content (table items). Otherwise a backend request could be triggered if needed

bCaseSensitive boolean

If true, the filtering is case-sensitive

getListBinding

Returns the ListBinding used for the field help.

sap.ui.mdc.field.FieldValueHelpContentWrapperBase.getMetadata

Returns a metadata object for class sap.ui.mdc.field.FieldValueHelpContentWrapperBase.

getSelectedItems

Gets current value of property selectedItems.

The selected items.

An item is an object with the properties key, description, inParameters and outParameters.

Note: This property must only be set by the FieldValueHelp element, not by the application.

Default value is [].

getSuggestionContent

Returns the content shown in the value help suggestion popup.

getTextForKey

Determines the description for n given key.

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

Param Type DefaultValue Description
vKey any

Key

oInParameters sap.ui.model.Filter

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

oOutParameters sap.ui.model.Filter

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

bNoRequest boolean

If true, the check must be only done on existing content (table items). Otherwise a backend request could be triggered if needed

bCaseSensitive boolean

If true, the filtering is case-sensitive

initialize

Initializes the wrapper. This is called if the FieldValueHelp element is opened. Here modules should be loaded that are only needed if the help is open.

Param Type DefaultValue Description
bSuggestion boolean

Flag if field help is opened as suggestion or dialog

isSuspended

Checks if the ListBinding of the wrapper has been suspended.

navigate

Triggers navigation of the content.

Param Type DefaultValue Description
iStep int

Number of steps for navigation (for example, 1 means next item, -1 means previous item)

removeFocus

The focus visualization of the table needs to be removed as the user starts typing into the field.

setSelectedItems

Sets a new value for property selectedItems.

The selected items.

An item is an object with the properties key, description, inParameters and outParameters.

Note: This property must only be set by the FieldValueHelp element, not by the application.

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

Default value is [].

Param Type DefaultValue Description
sSelectedItems object[] []

New value for property selectedItems