Base type for FieldValueHelp
content control wrapper.
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 |
Event | Description |
---|---|
dataUpdate |
This event is fired when the data of the field help is changed. This is needed for the |
navigate |
This event is fired when content is navigated. |
selectionChange |
This event is fired after a selection has been changed. |
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 |
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 |
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 |
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 If the |
attachDataUpdate |
Attaches event handler When called, the context of the event handler (its This event is fired when the data of the field help is changed. This is needed for the |
attachNavigate |
Attaches event handler When called, the context of the event handler (its This event is fired when content is navigated. |
attachSelectionChange |
Attaches event handler When called, the context of the event handler (its This event is fired after a selection has been changed. |
detachDataUpdate |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachNavigate |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSelectionChange |
Detaches event handler 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
|
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 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 |
getDialogContent |
Returns the content shown in the value help dialog. |
getFilterEnabled |
Returns |
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 |
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 Note: This property must only be set by the 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 |
isSuspended |
Checks if the |
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 Note: This property must only be set by the When called with a value of Default value is |
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) |
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 |
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 |
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 |
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 |
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 |
Checks if a ShoWAllItems-Footer should be created in the suggestion popover which will be shown if further selectable items are available.
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 |
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 |
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 |
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 |
|
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 |
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.
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 |
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 |
|
bCaseSensitive | boolean |
If |
Returns a metadata object for class sap.ui.mdc.field.FieldValueHelpContentWrapperBase.
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 []
.
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 |
|
bCaseSensitive | boolean |
If |
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 |
The focus visualization of the table needs to be removed as the user starts typing into the field.
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 |