abstract class sap.ui.mdc.valuehelp.base.Content

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

Content for the sap.ui.mdc.valuehelp.base.Container element.


Constructor

Constructor for a new Content.

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.valuehelp.base.Content(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[]

Conditions of the value help

Note: This property must not be set from outside, it is only to be used by the corresponding container

Visibility: public
config object empty object

internal configuration

Note: This property must not be set from outside, it is only to be used by the corresponding container

Visibility: public
filterValue string empty string

Value for filtering ($search)

Note: This property must not be set from outside, it is only to be used by the corresponding container

Visibility: public
shortTitle string empty string

Title text that appears in the dialog header.

Visibility: public
title string empty string

Title text that appears tab header.

Visibility: public

Aggregations

Default Aggregation:

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

Content control that is put inside the parent container

Note: This aggregation must not be set from outside, it is only to be used by the corresponding container


Events Overview

Event Description
cancel

Fired if the change is cancelled.

confirm

Fired if a change on the content is confirmed

navigated

Fired if a navigation was executed in the content

requestDelegateContent

Fired if the content requests the delegate content.

requestSwitchToDialog

Fired if the value help should switch to dialog mode.

select

Fired if the selected condition changed.

cancel

Fired if the change is cancelled.

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

confirm

Fired if a change on the content is confirmed

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

True if the value help need to be closed

navigated

Fired if a navigation was executed in the content

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

True if the focus should be set back to the field.

condition object

Navigated condition.

Note: A condition must have the structure of ConditionObject.

itemId string

ID of the navigated item. (This is needed to set the corresponding aria-attribute)

requestDelegateContent

Fired if the content requests the delegate content.

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

requestSwitchToDialog

Fired if the value help should switch to dialog mode.

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

select

Fired if the selected condition changed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
type sap.ui.mdc.enum.SelectType

Type of the selection change (add, remove)

conditions object[]

Changed conditions

Note: A condition must have the structure of ConditionObject.


Methods Overview

Method Description
_createCondition

Creates a condition based on the used operator.

attachCancel

Attaches event handler fnFunction to the cancel event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the change is cancelled.

attachConfirm

Attaches event handler fnFunction to the confirm event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if a change on the content is confirmed

attachNavigated

Attaches event handler fnFunction to the navigated event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if a navigation was executed in the content

attachRequestDelegateContent

Attaches event handler fnFunction to the requestDelegateContent event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the content requests the delegate content.

attachRequestSwitchToDialog

Attaches event handler fnFunction to the requestSwitchToDialog event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the value help should switch to dialog mode.

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the selected condition changed.

destroyDisplayContent

Destroys the displayContent in the aggregation displayContent.

detachCancel

Detaches event handler fnFunction from the cancel event of this sap.ui.mdc.valuehelp.base.Content.

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

detachConfirm

Detaches event handler fnFunction from the confirm event of this sap.ui.mdc.valuehelp.base.Content.

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

detachNavigated

Detaches event handler fnFunction from the navigated event of this sap.ui.mdc.valuehelp.base.Content.

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

detachRequestDelegateContent

Detaches event handler fnFunction from the requestDelegateContent event of this sap.ui.mdc.valuehelp.base.Content.

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

detachRequestSwitchToDialog

Detaches event handler fnFunction from the requestSwitchToDialog event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content.

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

sap.ui.mdc.valuehelp.base.Content.extend

Creates a new subclass of class sap.ui.mdc.valuehelp.base.Content 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.

fireCancel

Fires event cancel to attached listeners.

fireConfirm

Fires event confirm to attached listeners.

fireNavigated

Fires event navigated to attached listeners.

fireRequestDelegateContent

Fires event requestDelegateContent to attached listeners.

fireRequestSwitchToDialog

Fires event requestSwitchToDialog to attached listeners.

fireSelect

Fires event select to attached listeners.

getAriaAttributes

Returns the aria attributes the field needs from the value help

Note This function needs only to be implemented for Content implementing the sap.ui.mdc.valuehelp.Popover container. On dialogs the Dialog container defines the attributes, as it could have multiple contents.

getConditions

Gets current value of property conditions.

Conditions of the value help

Note: This property must not be set from outside, it is only to be used by the corresponding container

Default value is [].

getConfig

Gets current value of property config.

internal configuration

Note: This property must not be set from outside, it is only to be used by the corresponding container

Default value is {}.

getContainerConfig

Provides a configuration map for supported containers

getContent

Gets the content controls

getDisplayContent

Gets content of aggregation displayContent.

Content control that is put inside the parent container

Note: This aggregation must not be set from outside, it is only to be used by the corresponding container

getFilterValue

Gets current value of property filterValue.

Value for filtering ($search)

Note: This property must not be set from outside, it is only to be used by the corresponding container

Default value is empty string.

getFormattedShortTitle

Determines the title used in the header of the dialog.

Note: This function is used by the container and must not be used from outside

getFormattedTitle

Determines the title used in the TabBar of the dialog.

Note: This function is used by the container and must not be used from outside

getItemForValue

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

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

Note: This function must only be called by the Container element.

sap.ui.mdc.valuehelp.base.Content.getMetadata

Returns a metadata object for class sap.ui.mdc.valuehelp.base.Content.

getRequiresTokenizer

Determines if value help dialog should show the tokenizer for the content.

getShortTitle

Gets current value of property shortTitle.

Title text that appears in the dialog header.

Default value is empty string.

getTitle

Gets current value of property title.

Title text that appears tab header.

Default value is empty string.

getValueHelpIcon

Return the value help icon that should be used for the field.

Note This function needs only to be implemented for Content implementing the sap.ui.mdc.valuehelp.Popover container. On dialogs the Dialog container defines the icon, as it could have multiple contents.

isFocusInHelp

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

isMultiSelect

Determines if multiselection is active.

isValidationSupported

Defines if the content can be used for input validation.

navigate

Triggers navigation in the content.

As this could be asyncron as data might be loaded a promise is returned.

Note: This function must only be called by the Container element.

onHide

Called if the content will be hidden.

onShow

Called if the content will be shown.

removeFocus

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

Only needed for typeahead.

setConditions

Sets a new value for property conditions.

Conditions of the value help

Note: This property must not be set from outside, it is only to be used by the corresponding container

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

Default value is [].

setConfig

Sets a new value for property config.

internal configuration

Note: This property must not be set from outside, it is only to be used by the corresponding container

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

Default value is {}.

setDisplayContent

Sets the aggregated displayContent.

setFilterValue

Sets a new value for property filterValue.

Value for filtering ($search)

Note: This property must not be set from outside, it is only to be used by the corresponding container

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

Default value is empty string.

setShortTitle

Sets a new value for property shortTitle.

Title text that appears in the dialog header.

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

Default value is empty string.

setTitle

Sets a new value for property title.

Title text that appears tab header.

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

Default value is empty string.

shouldOpenOnClick

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

shouldOpenOnNavigate

Determines if the value help should be opened when the user used the arrow keys. By default closed navigation is only enabled for single select scenarios

_createCondition

Creates a condition based on the used operator.

Param Type DefaultValue Description
vValue string

Value of the condition. For item conditions this must be the key.

sDescription string

Description of the operator

oInParameters object

In parameters of the condition

oOutParameters object

Out parameters of the condition

attachCancel

Attaches event handler fnFunction to the cancel event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the change is cancelled.

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.valuehelp.base.Content itself

attachConfirm

Attaches event handler fnFunction to the confirm event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if a change on the content is confirmed

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.valuehelp.base.Content itself

attachNavigated

Attaches event handler fnFunction to the navigated event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if a navigation was executed in the content

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.valuehelp.base.Content itself

attachRequestDelegateContent

Attaches event handler fnFunction to the requestDelegateContent event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the content requests the delegate content.

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.valuehelp.base.Content itself

attachRequestSwitchToDialog

Attaches event handler fnFunction to the requestSwitchToDialog event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the value help should switch to dialog mode.

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.valuehelp.base.Content itself

attachSelect

Attaches event handler fnFunction to the select event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content itself.

Fired if the selected condition 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.valuehelp.base.Content itself

destroyDisplayContent

Destroys the displayContent in the aggregation displayContent.

detachCancel

Detaches event handler fnFunction from the cancel event of this sap.ui.mdc.valuehelp.base.Content.

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

detachConfirm

Detaches event handler fnFunction from the confirm event of this sap.ui.mdc.valuehelp.base.Content.

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

detachNavigated

Detaches event handler fnFunction from the navigated event of this sap.ui.mdc.valuehelp.base.Content.

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

detachRequestDelegateContent

Detaches event handler fnFunction from the requestDelegateContent event of this sap.ui.mdc.valuehelp.base.Content.

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

detachRequestSwitchToDialog

Detaches event handler fnFunction from the requestSwitchToDialog event of this sap.ui.mdc.valuehelp.base.Content.

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.valuehelp.base.Content.

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.valuehelp.base.Content.extend

Creates a new subclass of class sap.ui.mdc.valuehelp.base.Content 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

fireCancel

Fires event cancel to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireConfirm

Fires event confirm to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

close boolean

True if the value help need to be closed

fireNavigated

Fires event navigated to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

bLeaveFocus boolean

True if the focus should be set back to the field.

condition object

Navigated condition.

Note: A condition must have the structure of ConditionObject.

itemId string

ID of the navigated item. (This is needed to set the corresponding aria-attribute)

fireRequestDelegateContent

Fires event requestDelegateContent to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireRequestSwitchToDialog

Fires event requestSwitchToDialog 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

type sap.ui.mdc.enum.SelectType

Type of the selection change (add, remove)

conditions object[]

Changed conditions

Note: A condition must have the structure of ConditionObject.

getAriaAttributes

Returns the aria attributes the field needs from the value help

Note This function needs only to be implemented for Content implementing the sap.ui.mdc.valuehelp.Popover container. On dialogs the Dialog container defines the attributes, as it could have multiple contents.

Param Type DefaultValue Description
iMaxConditions int

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

getConditions

Gets current value of property conditions.

Conditions of the value help

Note: This property must not be set from outside, it is only to be used by the corresponding container

Default value is [].

getConfig

Gets current value of property config.

internal configuration

Note: This property must not be set from outside, it is only to be used by the corresponding container

Default value is {}.

getContainerConfig

Provides a configuration map for supported containers

getContent

Gets the content controls

getDisplayContent

Gets content of aggregation displayContent.

Content control that is put inside the parent container

Note: This aggregation must not be set from outside, it is only to be used by the corresponding container

getFilterValue

Gets current value of property filterValue.

Value for filtering ($search)

Note: This property must not be set from outside, it is only to be used by the corresponding container

Default value is empty string.

getFormattedShortTitle

Determines the title used in the header of the dialog.

Note: This function is used by the container and must not be used from outside

getFormattedTitle

Determines the title used in the TabBar of the dialog.

Note: This function is used by the container and must not be used from outside

Param Type DefaultValue Description
iCount int

Number of selected items or conditions

getItemForValue

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

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

Note: This function must only be called by the Container element.

Param Type DefaultValue Description
oConfig object

Configuration

value any

Value as entered by user

parsedValue any

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

inParameters object

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

outParameters object

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

bindingContext sap.ui.model.Context

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

checkKeyFirst boolean

If set, the content checks first if the value fits a key // TODO: not longer needed?

checkKey boolean

If set, the content 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.

checkDescription boolean

If set, the content 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.

conditionModel sap.ui.mdc.condition.ConditionModel

ConditionModel, in case of FilterField

conditionModelName string

Name of the ConditionModel, in case of FilterField

caseSensitive boolean

If set, the check is done case sensitive

sap.ui.mdc.valuehelp.base.Content.getMetadata

Returns a metadata object for class sap.ui.mdc.valuehelp.base.Content.

getRequiresTokenizer

Determines if value help dialog should show the tokenizer for the content.

getShortTitle

Gets current value of property shortTitle.

Title text that appears in the dialog header.

Default value is empty string.

getTitle

Gets current value of property title.

Title text that appears tab header.

Default value is empty string.

getValueHelpIcon

Return the value help icon that should be used for the field.

Note This function needs only to be implemented for Content implementing the sap.ui.mdc.valuehelp.Popover container. On dialogs the Dialog container defines the icon, as it could have multiple contents.

isFocusInHelp

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

isMultiSelect

Determines if multiselection is active.

isValidationSupported

Defines if the content can be used for input validation.

navigate

Triggers navigation in the content.

As this could be asyncron as data might be loaded a promise is returned.

Note: This function must only be called by the Container element.

Param Type DefaultValue Description
iStep int

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

onHide

Called if the content will be hidden.

onShow

Called if the content will be shown.

removeFocus

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

Only needed for typeahead.

setConditions

Sets a new value for property conditions.

Conditions of the value help

Note: This property must not be set from outside, it is only to be used by the corresponding container

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

setConfig

Sets a new value for property config.

internal configuration

Note: This property must not be set from outside, it is only to be used by the corresponding container

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
oConfig object {}

New value for property config

setDisplayContent

Sets the aggregated displayContent.

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

The displayContent to set

setFilterValue

Sets a new value for property filterValue.

Value for filtering ($search)

Note: This property must not be set from outside, it is only to be used by the corresponding container

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

setShortTitle

Sets a new value for property shortTitle.

Title text that appears in the dialog header.

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
sShortTitle string ""

New value for property shortTitle

setTitle

Sets a new value for property title.

Title text that appears tab header.

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
sTitle string ""

New value for property title

shouldOpenOnClick

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

shouldOpenOnNavigate

Determines if the value help should be opened when the user used the arrow keys. By default closed navigation is only enabled for single select scenarios