abstract class sap.ui.mdc.field.FieldHelpBase

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

Base type for the FieldHelp association in the FieldBase controls.


Constructor

Constructor for a new FieldHelpBase.

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.FieldHelpBase(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
conditions object[]

The conditions of the selected items.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Note: A condition must have the structure of ConditionObject.

Visibility: public
delegate object ...see text or source

Defines the module path of the metadata delegate.

Visibility: public
filterValue string empty string

The value by which the help is filtered.

Note: This only takes effect if the FieldHelp element supports filtering.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Visibility: public
validateInput boolean true

If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs.

If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.)

Since: 1.69.0.

Visibility: public

Borrowed Properties

Name Type Default Value Description
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

Aggregations

Default Aggregation:

Name Cardinality Type Description
_popover 0..1 sap.m.Popover

internal popover


Events Overview

Event Description
afterClose

This event is fired after the field help has been closed.

Since: 1.61.0.

dataUpdate

This event is fired when the data of the FieldHelp element has been changed.

This might be needed to trigger an update for formatting a key with it's description.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

disconnect

This event is fired when the FieldHelp element is disconnected from a control.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

navigate

This event is fired when a value help entry is navigated using arrow keys.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

open

This event is fired when the field help is opened.

Since: 1.60.0.

select

This event is fired when a value is selected in the field help.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

switchToValueHelp

This event is fired if suggestion should be closed and value help should be opened.

The opening must be handled by the field as focus and accessibility handling is needed.

Since: 1.92.0.

afterClose

This event is fired after the field help has been closed.

Since: 1.61.0.

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

dataUpdate

This event is fired when the data of the FieldHelp element has been changed.

This might be needed to trigger an update for formatting a key with it's description.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

disconnect

This event is fired when the FieldHelp element is disconnected from a control.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

navigate

This event is fired when a value help entry is navigated using arrow keys.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

The navigated value

key any

The navigated key

condition object

The navigated condition

Note A condition has the structure of ConditionObject.

Since: 1.66.0.

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.

leaveFocus boolean

If set the focus visualization should be moved back to the field

Since: 1.91.0.

open

This event is fired when the field help is opened.

Since: 1.60.0.

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

select

This event is fired when a value is selected in the field help.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

The selected conditions

Note: A condition has the structure of ConditionObject.

add boolean

If set, the selected conditions are added by the listening control, otherwise they replace the existing ones

Since: 1.60.0.

close boolean

Indicator if the field help is closed while selection

since: 1.77.0

switchToValueHelp

This event is fired if suggestion should be closed and value help should be opened.

The opening must be handled by the field as focus and accessibility handling is needed.

Since: 1.92.0.

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

Methods Overview

Method Description
_callContentRequest

Calls the contentRequest function of the delegate.

_createCondition

Creates a condition based on the used operator.

_createPopover

Creates the internal Popover control.

To be used by an inherited FieldHelp, not from outside.

_fireOpen

Fires the open event and calls contentRequest function of the delegate.

If the delegate returns a promise, the callback function is called (for example, to open the field help) after the Promise has been resolved.

_getContenRequestProperties

Gets the field help specific properties for contentRequest function of the delegate.

_getControlForSuggestion

Returns the control for which the suggestion is opened.

_getField

Returns the currently active control to which the FieldHelp element is assigned.

This is the control set by the connect function or the parent.

_getOperator

Returns the currently used operator for chosen values.

_getPopover

Returns the internal Popover control. If the Popover control doesn't exist, it will be created.

To be used by an inherited FieldHelp element, not from outside.

_getTextOrKey

Determines the description for a given key or the key for a given description.

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

When using getKeyForText, oInParamer and oOutParameter are not supported.

_handleAfterClose

Executed after the Popover control has been closed,

To be used by an inherited FieldHelp element, not from outside.

_handleAfterOpen

Executed after the Popover control has been opened.

To be used by an inherited FieldHelp element, not from outside.

_isTextOrKeyRequestSupported

Defines if the field help supports backend requests to determine key or description

_setContent

Sets the content of the FieldHelp element.

To be used by an inherited FieldHelp element, not from outside.

attachAfterClose

Attaches event handler fnFunction to the afterClose event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired after the field help has been closed.

attachDataUpdate

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

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

This event is fired when the data of the FieldHelp element has been changed.

This might be needed to trigger an update for formatting a key with it's description.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

attachDisconnect

Attaches event handler fnFunction to the disconnect event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired when the FieldHelp element is disconnected from a control.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

attachNavigate

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

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

This event is fired when a value help entry is navigated using arrow keys.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

attachOpen

Attaches event handler fnFunction to the open event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired when the field help is opened.

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired when a value is selected in the field help.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

attachSwitchToValueHelp

Attaches event handler fnFunction to the switchToValueHelp event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired if suggestion should be closed and value help should be opened.

The opening must be handled by the field as focus and accessibility handling is needed.

close

closes the field help.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

connect

Connects the FieldHelp element to a control.

If the FieldHelp element is used as an association to multiple controls, it has to know the currently active control to open and interact.

If the FieldHelp element is connected to a control, the disconnected event is fired to inform the previously connected control.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

detachAfterClose

Detaches event handler fnFunction from the afterClose event of this sap.ui.mdc.field.FieldHelpBase.

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

detachDataUpdate

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

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

detachDisconnect

Detaches event handler fnFunction from the disconnect event of this sap.ui.mdc.field.FieldHelpBase.

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.FieldHelpBase.

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

detachOpen

Detaches event handler fnFunction from the open event of this sap.ui.mdc.field.FieldHelpBase.

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

detachSelect

Detaches event handler fnFunction from the select event of this sap.ui.mdc.field.FieldHelpBase.

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

detachSwitchToValueHelp

Detaches event handler fnFunction from the switchToValueHelp event of this sap.ui.mdc.field.FieldHelpBase.

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

sap.ui.mdc.field.FieldHelpBase.extend

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

fireAfterClose

Fires event afterClose to attached listeners.

fireDataUpdate

Fires event dataUpdate to attached listeners.

fireDisconnect

Fires event disconnect to attached listeners.

fireNavigate

Fires event navigate to attached listeners.

fireOpen

Fires event open to attached listeners.

fireSelect

Fires event select to attached listeners.

fireSwitchToValueHelp

Fires event switchToValueHelp to attached listeners.

getAriaHasPopup

Returns the value for aria attribute haspopup

The screenreader needs to know what content the popup has.

getConditions

Gets current value of property conditions.

The conditions of the selected items.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Note: A condition must have the structure of ConditionObject.

Default value is [].

getContentId

Returns the ID of the content that displays the values (list or table).

This is used to enrich the field with the corresponding ARIA attributes.

getDelegate

Gets current value of property delegate.

Defines the module path of the metadata delegate.

Default value is ...see text or source.

getFieldPath

Returns the currently used FieldPath.

This is taken from the connected field.

getFilterValue

Gets current value of property filterValue.

The value by which the help is filtered.

Note: This only takes effect if the FieldHelp element supports filtering.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Default value is empty string.

getIcon

Determines the icon for the value help.

getItemForValue

Determines the item (key and description) for a given value.

The field help checks if there is an item with a key or description that fits this value.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

getKeyForText

Determines the key for a given description.

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

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Note: As this must not be unique, the result key may be just one for one of the matching texts.

sap.ui.mdc.field.FieldHelpBase.getMetadata

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

getRoleDescription

Returns the description of the ARIA role added to the assigned field.

Normally the role is set to combobox. This works for most cases, so per default no description is needed. But in some cases, such as the multi-select mode, an additional description is needed.

getTextForKey

Determines the description for a given key.

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

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

getValidateInput

Gets current value of property validateInput.

If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs.

If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.)

Default value is true.

getValueHelpEnabled

Checks if a "valueHelp enabled" text should be rendered for screenreader.

If a complex value help exists on a field a corresponding text needs to be read out by screen readers. For simple "combobox" cases this is not needed. So this depends on the specific value help.

initBeforeOpen

Calls initialization of the FieldHelp before the FieldHelp is really opened. This is called in Typeahead on first letter before the FieldHelp is opened with a delay. So the content can be determined in the delegate coding early.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

isFocusInHelp

Determines if the focus is set in the value help or stays in the calling control.

isOpen

Determines if the field help is open.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

isUsableForValidation

Defines if the field help is used for input validation.

isValidationSupported

Defines if the field help supports input validation to determine key or description

navigate

Triggers navigation in the field help.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

onFieldChange

Triggers some logic that must be executed in FieldHelp element if a Change event on the connected field is fired.

This is done if the corresponding field value is changed (not during navigation).

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

open

Opens the field help for the Field control to which the FieldHelp element is connected.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

openByClick

Determines if the field help should be opened when the user clicks into the connected field.

Opening the field help must be triggered by the control the FieldHelp element belongs to.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

openByTyping

Determines if the field help should be opened when something is typed into the field.

Opening the field help must be triggered by the control the FieldHelp element belongs to.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

removeFocus

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

setConditions

Sets a new value for property conditions.

The conditions of the selected items.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Note: A condition must have the structure of ConditionObject.

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

Default value is [].

setDelegate

Sets a new value for property delegate.

Defines the module path of the metadata delegate.

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

Default value is ...see text or source.

setFilterValue

Sets a new value for property filterValue.

The value by which the help is filtered.

Note: This only takes effect if the FieldHelp element supports filtering.

Note: This property must only be set by the control the FieldHelp element belongs to, 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 empty string.

setValidateInput

Sets a new value for property validateInput.

If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs.

If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.)

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

Default value is true.

skipOpening

Skips the opening of the field help if it is pending because of loading content.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

toggleOpen

Toggles the open state of the field help.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

_callContentRequest

Calls the contentRequest function of the delegate.

Param Type DefaultValue Description
bSuggestion boolean

Flag if field help is opened for a suggestion or for ValueHelp

fnCallback function

Callback function executed after asynchronous execution

_createCondition

Creates a condition based on the used operator.

Param Type DefaultValue Description
sKey string

Operator for the condition

sDescription string

Description of the operator

oInParameters object

In parameters of the condition

oOutParameters object

Out parameters of the condition

_createPopover

Creates the internal Popover control.

To be used by an inherited FieldHelp, not from outside.

_fireOpen

Fires the open event and calls contentRequest function of the delegate.

If the delegate returns a promise, the callback function is called (for example, to open the field help) after the Promise has been resolved.

Param Type DefaultValue Description
bSuggestion boolean

Flag if field help is opened for a suggestion or for ValueHelp

fnCallback function

Callback function executed after asynchronous execution

_getContenRequestProperties

Gets the field help specific properties for contentRequest function of the delegate.

Param Type DefaultValue Description
bSuggestion boolean

Flag if field help is opened for a suggestion or for ValueHelp

_getControlForSuggestion

Returns the control for which the suggestion is opened.

_getField

Returns the currently active control to which the FieldHelp element is assigned.

This is the control set by the connect function or the parent.

_getOperator

Returns the currently used operator for chosen values.

_getPopover

Returns the internal Popover control. If the Popover control doesn't exist, it will be created.

To be used by an inherited FieldHelp element, not from outside.

_getTextOrKey

Determines the description for a given key or the key for a given description.

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

When using getKeyForText, oInParamer and oOutParameter are not supported.

Param Type DefaultValue Description
vValue any

Key or description

bKey boolean

If true vValue is handled as key, otherwise as description

oBindingContext sap.ui.model.Context

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

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.)

bNoRequest boolean

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

oConditionModel sap.ui.mdc.condition.ConditionModel

ConditionModel, in case of FilterField

sConditionModelName string

Name of the ConditionModel, in case of FilterField

vParsedValue any

Parsed value to be used as key

bKeyAndDescription boolean

If true, key and description are determined with one call

bCaseSensitive boolean

If true, the filtering is case-sensitive

_handleAfterClose

Executed after the Popover control has been closed,

To be used by an inherited FieldHelp element, not from outside.

Param Type DefaultValue Description
oEvent object

Event object

_handleAfterOpen

Executed after the Popover control has been opened.

To be used by an inherited FieldHelp element, not from outside.

Param Type DefaultValue Description
oEvent object

Event object

_isTextOrKeyRequestSupported

Defines if the field help supports backend requests to determine key or description

_setContent

Sets the content of the FieldHelp element.

To be used by an inherited FieldHelp element, not from outside.

Param Type DefaultValue Description
oContent string

Content control to be placed at the Popover

attachAfterClose

Attaches event handler fnFunction to the afterClose event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired after the field help has been closed.

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

attachDataUpdate

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

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

This event is fired when the data of the FieldHelp element has been changed.

This might be needed to trigger an update for formatting a key with it's description.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

attachDisconnect

Attaches event handler fnFunction to the disconnect event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired when the FieldHelp element is disconnected from a control.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

attachNavigate

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

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

This event is fired when a value help entry is navigated using arrow keys.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

attachOpen

Attaches event handler fnFunction to the open event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired when the field help is opened.

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

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired when a value is selected in the field help.

Note: This event must only be handled by the control the FieldHelp element belongs to, not by the application.

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

attachSwitchToValueHelp

Attaches event handler fnFunction to the switchToValueHelp event of this sap.ui.mdc.field.FieldHelpBase.

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

This event is fired if suggestion should be closed and value help should be opened.

The opening must be handled by the field as focus and accessibility handling is needed.

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

close

closes the field help.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

connect

Connects the FieldHelp element to a control.

If the FieldHelp element is used as an association to multiple controls, it has to know the currently active control to open and interact.

If the FieldHelp element is connected to a control, the disconnected event is fired to inform the previously connected control.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
oField sap.ui.core.Control

Control to which the FieldHelp element is connected to

detachAfterClose

Detaches event handler fnFunction from the afterClose event of this sap.ui.mdc.field.FieldHelpBase.

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

detachDataUpdate

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

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

detachDisconnect

Detaches event handler fnFunction from the disconnect event of this sap.ui.mdc.field.FieldHelpBase.

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.FieldHelpBase.

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

detachOpen

Detaches event handler fnFunction from the open event of this sap.ui.mdc.field.FieldHelpBase.

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

detachSelect

Detaches event handler fnFunction from the select event of this sap.ui.mdc.field.FieldHelpBase.

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

detachSwitchToValueHelp

Detaches event handler fnFunction from the switchToValueHelp event of this sap.ui.mdc.field.FieldHelpBase.

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.FieldHelpBase.extend

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

fireAfterClose

Fires event afterClose to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireDataUpdate

Fires event dataUpdate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireDisconnect

Fires event disconnect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireNavigate

Fires event navigate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

value any

The navigated value

key any

The navigated key

condition object

The navigated condition

Note A condition has the structure of ConditionObject.

itemId string

The ID of the navigated item

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

leaveFocus boolean

If set the focus visualization should be moved back to the field

fireOpen

Fires event open to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireSelect

Fires event select to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

conditions object[]

The selected conditions

Note: A condition has the structure of ConditionObject.

add boolean

If set, the selected conditions are added by the listening control, otherwise they replace the existing ones

close boolean

Indicator if the field help is closed while selection

since: 1.77.0

fireSwitchToValueHelp

Fires event switchToValueHelp to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getAriaHasPopup

Returns the value for aria attribute haspopup

The screenreader needs to know what content the popup has.

getConditions

Gets current value of property conditions.

The conditions of the selected items.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Note: A condition must have the structure of ConditionObject.

Default value is [].

getContentId

Returns the ID of the content that displays the values (list or table).

This is used to enrich the field with the corresponding ARIA attributes.

getDelegate

Gets current value of property delegate.

Defines the module path of the metadata delegate.

Default value is ...see text or source.

getFieldPath

Returns the currently used FieldPath.

This is taken from the connected field.

getFilterValue

Gets current value of property filterValue.

The value by which the help is filtered.

Note: This only takes effect if the FieldHelp element supports filtering.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Default value is empty string.

getIcon

Determines the icon for the value help.

getItemForValue

Determines the item (key and description) for a given value.

The field help checks if there is an item with a key or description that fits this value.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
vValue any

Value as entered by user

vParsedValue any

Value parsed by type to fit the data type of the 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.

bCheckKeyFirst boolean

If set, the field help checks first if the value fits a key

bCheckKey boolean

If set, the field help checks only 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, the field help checks only 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, in case of FilterField

sConditionModelName string

Name of the ConditionModel, in case of FilterField

getKeyForText

Determines the key for a given description.

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

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Note: As this must not be unique, the result key may be just one for one of the matching texts.

Param Type DefaultValue Description
sText string

Description

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, in case of FilterField

sConditionModelName string

Name of the ConditionModel, in case of FilterField

sap.ui.mdc.field.FieldHelpBase.getMetadata

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

getRoleDescription

Returns the description of the ARIA role added to the assigned field.

Normally the role is set to combobox. This works for most cases, so per default no description is needed. But in some cases, such as the multi-select mode, an additional description is needed.

Param Type DefaultValue Description
iMaxConditions int

maximal conditions allowed (as FieldHelp might not be connected to a field)

getTextForKey

Determines the description for a given key.

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

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
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, in case of FilterField

sConditionModelName string

Name of the ConditionModel, in case of FilterField

getValidateInput

Gets current value of property validateInput.

If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs.

If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.)

Default value is true.

getValueHelpEnabled

Checks if a "valueHelp enabled" text should be rendered for screenreader.

If a complex value help exists on a field a corresponding text needs to be read out by screen readers. For simple "combobox" cases this is not needed. So this depends on the specific value help.

initBeforeOpen

Calls initialization of the FieldHelp before the FieldHelp is really opened. This is called in Typeahead on first letter before the FieldHelp is opened with a delay. So the content can be determined in the delegate coding early.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
bSuggestion boolean

Flag that determines whether field help is opened for suggestion or for complex help

isFocusInHelp

Determines if the focus is set in the value help or stays in the calling control.

isOpen

Determines if the field help is open.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
bCheckClosing boolean

If set a closing field help is handled as closed

isUsableForValidation

Defines if the field help is used for input validation.

isValidationSupported

Defines if the field help supports input validation to determine key or description

navigate

Triggers navigation in the field help.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
iStep int

Number of steps for navigation (e.g. 1 means next item, -1 means previous item)

onFieldChange

Triggers some logic that must be executed in FieldHelp element if a Change event on the connected field is fired.

This is done if the corresponding field value is changed (not during navigation).

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

open

Opens the field help for the Field control to which the FieldHelp element is connected.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
bSuggestion boolean

Flag that determines whether field help is opened for suggestion or for complex help

openByClick

Determines if the field help should be opened when the user clicks into the connected field.

Opening the field help must be triggered by the control the FieldHelp element belongs to.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

openByTyping

Determines if the field help should be opened when something is typed into the field.

Opening the field help must be triggered by the control the FieldHelp element belongs to.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

removeFocus

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

setConditions

Sets a new value for property conditions.

The conditions of the selected items.

Note: This property must only be set by the control the FieldHelp element belongs to, not by the application.

Note: A condition must have the structure of ConditionObject.

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
sConditions object[] []

New value for property conditions

setDelegate

Sets a new value for property delegate.

Defines the module path of the metadata delegate.

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

Default value is ...see text or source.

Param Type DefaultValue Description
oDelegate object ...see text or source

New value for property delegate

setFilterValue

Sets a new value for property filterValue.

The value by which the help is filtered.

Note: This only takes effect if the FieldHelp element supports filtering.

Note: This property must only be set by the control the FieldHelp element belongs to, 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 empty string.

Param Type DefaultValue Description
sFilterValue string ""

New value for property filterValue

setValidateInput

Sets a new value for property validateInput.

If this property is set, the user input is validated against the field help. If no entry is found for the user input, an error occurs.

If this property is not set, the user input is still checked against the field help. But if no entry is found, the user input is set to the field if the used data type allows this. (A type parsing error is shown if the user input adheres to the requirements of the used data type.)

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

Default value is true.

Param Type DefaultValue Description
bValidateInput boolean true

New value for property validateInput

skipOpening

Skips the opening of the field help if it is pending because of loading content.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

toggleOpen

Toggles the open state of the field help.

Note: This function must only be called by the control the FieldHelp element belongs to, not by the application.

Param Type DefaultValue Description
bSuggestion boolean

Flag that determines whether field help is opened for suggestion or for complex help