Represents a list of values for the sap.m.FacetFilter control.
Note: FacetFilterList
is a subclass of sap.m.List and supports growing enablement feature via the property growing
. When you use this feature, be aware that it only works with one-way data binding. Having growing feature enabled when the items
aggregation is bound to a model with two-way data binding, may lead to unexpected and/or inconsistent behavior across browsers, such as unexpected closing of the list.
While the FacetFilterList
popup is opened (when the user selects a button corresponding to the list's name), any other activities leading to focus change will close it. For example, when the popup is opened and the app developer loads a sap.m.BusyDialog or any other dialog that obtains the focus, the popup will be closed.
Constructor for a new FacetFilterList
.
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.m.FacetFilterList(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 |
Name | Type | Default Value | Description |
---|---|---|---|
active | boolean | true | Indicates that the list is displayed as a button when the FacetFilter type is set to Note: Set the |
allCount | int | Determines the number of objects that match this item in the target data set when all filter items are selected. Visibility: public |
|
dataType | sap.m.FacetFilterListDataType | String | FacetFilterList data type. Only String data type will provide search function. Visibility: public |
enableCaseInsensitiveSearch | boolean | false | If set to |
key | string | Unique identifier for this filter list. Visibility: public |
|
multiSelect | boolean | true | Specifies whether multiple or single selection is used. Visibility: public |
retainListSequence | boolean | false | Retains the list sequence if it is inactive and made active again. |
sequence | int | -1 | Sequence that determines the order in which FacetFilterList is shown on the FacetFilter. Lists are rendered by ascending order of sequence. Visibility: public |
showRemoveFacetIcon | boolean | true | Specifies whether remove icon for facet is visible or hidden. |
title | string | Defines the title of the facet. The facet title is displayed on the facet button when the FacetFilter type is set to |
|
wordWrap | boolean | false | If set to |
Name | Type | Default Value | Description |
---|---|---|---|
backgroundDesign | sap.m.BackgroundDesign | Solid | Sets the background style of the list. Depending on the theme, you can change the state of the background from |
enableBusyIndicator | boolean | true | When this property is set to |
footerText | string | Defines the footer text that appears in the control. Visibility: public |
|
growing | boolean | false | If set to |
growingDirection | sap.m.ListGrowingDirection | Downwards | Defines the direction of the growing feature. If set to |
growingScrollToLoad | boolean | false | If set to true, the user can scroll down/up to load more items. Otherwise a growing button is displayed at the bottom/top of the control. Note: This property can only be used if the |
growingThreshold | int | 20 | Defines the number of items to be requested from the model for each grow. This property can only be used if the |
growingTriggerText | string | Defines the text displayed on the growing button. The default is a translated text ("More") coming from the message bundle. This property can only be used if the |
|
headerDesign | sap.m.ListHeaderDesign | Standard | Defines the header style of the control. Possible values are |
headerText | string | Defines the header text that appears in the control. Note: If |
|
includeItemInSelection | boolean | false | Defines whether the items are selectable by clicking on the item itself ( |
inset | boolean | false | Defines the indentation of the container. Setting it to |
keyboardMode | sap.m.ListKeyboardMode | Navigation | Defines keyboard handling behavior of the control. |
mode | sap.m.ListMode | None | Defines the mode of the control (e.g. |
modeAnimationOn | boolean | true | Defines if animations will be shown while switching between modes. Visibility: public |
multiSelectMode | sap.m.MultiSelectMode | Default | Defines the multi-selection mode for the control. If this property is set to the Note: This property must be used with the |
noDataText | string | This text is displayed when the control contains no items. Visibility: public |
|
rememberSelections | boolean | true | If set to true, this control remembers and retains the selection of the items after a binding update has been performed (e.g. sorting, filtering). Note: This feature works only if two-way data binding for the |
showNoData | boolean | true | Defines whether or not the text specified in the |
showSeparators | sap.m.ListSeparators | All | Defines which item separator style will be used. Visibility: public |
showUnread | boolean | false | Activates the unread indicator for all items, if set to |
sticky | sap.m.Sticky[] | Defines the section of the control that remains fixed at the top of the page during vertical scrolling as long as the control is in the viewport. Note: Enabling sticky column headers in List controls will not have any effect. There are some known restrictions. A few are given below:
Since: 1.58.Visibility: public |
|
swipeDirection | sap.m.SwipeDirection | Both | Defines the direction of the swipe movement (e.g LeftToRight, RightToLeft, Both) to display the control defined in the |
width | sap.ui.core.CSSSize | 100% | Sets the width of the control. Visibility: public |
Name | Cardinality | Type | Description |
---|---|---|---|
contextMenu | 0..1 | sap.ui.core.IContextMenu |
Defines the context menu of the items. |
headerToolbar | 0..1 | sap.m.Toolbar |
The header area can be used as a toolbar to add extra controls for user interactions. Note: When set, this overwrites the |
infoToolbar | 0..1 | sap.m.Toolbar |
A toolbar that is placed below the header to show extra information to the user. |
items | 0..n | sap.m.ListItemBase |
Defines the items contained within this control. |
swipeContent | 0..1 | sap.ui.core.Control |
User can swipe to bring in this control on the right hand side of an item. Note:
|
Event | Description |
---|---|
listClose |
Triggered after the list of items is closed. |
listOpen |
Fired before the filter list is opened. The default filtering behavior of the sap.m.FacetFilterList can be prevented by calling Listeners may prevent the default action of this event by calling the |
search |
Triggered after the Search button is pressed or by pressing Enter in search input field. The default filtering behavior of the control can be prevented by calling Listeners may prevent the default action of this event by calling the |
Triggered after the list of items is closed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
selectedItems | sap.m.FacetFilterItem[] |
Array of selected items. Items returned are only copies and therefore can only be used to read properties, not set them. |
allSelected | boolean |
|
selectedKeys | object |
Associative array containing the keys of selected FacetFilterItems. Unlike the selectedItems parameter, this contains only the keys for all selected items, not the items themselves. Being an associative array, each object property is the FacetFilterItem key value and the value of the property is the FacetFilterItem text. |
Fired before the filter list is opened.
The default filtering behavior of the sap.m.FacetFilterList can be prevented by calling sap.ui.base.Event.prototype.preventDefault
function in the listOpen
event handler function. If the default filtering behavior is prevented then filtering behavior has to be defined at application level inside the listOpen
event handler function.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Triggered after the Search button is pressed or by pressing Enter in search input field.
The default filtering behavior of the control can be prevented by calling sap.ui.base.Event.prototype.preventDefault
function in the search
event handler function. Preventing the default behavior is useful in cases when items aggregation could be taking long time fetching from the OData model. As a result, no list items are loaded initially. If the default filtering behavior is prevented then filtering behavior has to be defined at application level inside the search
event handler function.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object.
Since: 1.76.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
term | string |
Value received as user input in the |
Method | Description |
---|---|
attachListClose |
Attaches event handler When called, the context of the event handler (its Triggered after the list of items is closed. |
attachListOpen |
Attaches event handler When called, the context of the event handler (its Fired before the filter list is opened. The default filtering behavior of the sap.m.FacetFilterList can be prevented by calling |
attachSearch |
Attaches event handler When called, the context of the event handler (its Triggered after the Search button is pressed or by pressing Enter in search input field. The default filtering behavior of the control can be prevented by calling |
detachListClose |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachListOpen |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSearch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.FacetFilterList.extend |
Creates a new subclass of class sap.m.FacetFilterList with name
|
fireListClose |
Fires event listClose to attached listeners. |
fireListOpen |
Fires event listOpen to attached listeners. Listeners may prevent the default action of this event by calling the |
fireSearch |
Fires event search to attached listeners. Listeners may prevent the default action of this event by calling the |
getActive |
Gets current value of property active. Indicates that the list is displayed as a button when the FacetFilter type is set to Note: Set the Default value is |
getAllCount |
Gets current value of property allCount. Determines the number of objects that match this item in the target data set when all filter items are selected. |
getDataType |
Gets current value of property dataType. FacetFilterList data type. Only String data type will provide search function. Default value is |
getEnableCaseInsensitiveSearch |
Gets current value of property enableCaseInsensitiveSearch. If set to Default value is |
getKey |
Gets current value of property key. Unique identifier for this filter list. |
sap.m.FacetFilterList.getMetadata |
Returns a metadata object for class sap.m.FacetFilterList. |
getMultiSelect |
Gets current value of property multiSelect. Specifies whether multiple or single selection is used. Default value is
Since 1.20.0 replaced by <code>setMode</code> method. <code>FacetFilterList</code> overrides the <code>setMode</code> method to restrict the possible modes to <code>MultiSelect</code> and <code>SingleSelectMaster</code>. All other modes are ignored and will not be set.
|
getRetainListSequence |
Gets current value of property retainListSequence. Retains the list sequence if it is inactive and made active again. Default value is |
getSelectedKeys |
Returns the keys of the selected elements as an associative array. An empty object is returned if no items are selected. |
getSequence |
Gets current value of property sequence. Sequence that determines the order in which FacetFilterList is shown on the FacetFilter. Lists are rendered by ascending order of sequence. Default value is |
getShowRemoveFacetIcon |
Gets current value of property showRemoveFacetIcon. Specifies whether remove icon for facet is visible or hidden. Default value is |
getTitle |
Gets current value of property title. Defines the title of the facet. The facet title is displayed on the facet button when the FacetFilter type is set to |
getWordWrap |
Gets current value of property wordWrap. If set to Default value is |
removeSelectedKey |
Removes the specified key from the selected keys cache and deselects the item. |
removeSelectedKeys |
Removes all selected keys from the selected keys cache and deselects all items. |
setActive |
Sets a new value for property active. Indicates that the list is displayed as a button when the FacetFilter type is set to Note: Set the When called with a value of Default value is |
setAllCount |
Sets a new value for property allCount. Determines the number of objects that match this item in the target data set when all filter items are selected. When called with a value of |
setDataType |
Sets a new value for property dataType. FacetFilterList data type. Only String data type will provide search function. When called with a value of Default value is |
setEnableCaseInsensitiveSearch |
Sets a new value for property enableCaseInsensitiveSearch. If set to When called with a value of Default value is |
setKey |
Sets a new value for property key. Unique identifier for this filter list. When called with a value of |
setMode |
Overrides to allow only MultiSelect and SingleSelectMaster list modes. If an invalid mode is given then the mode will not be changed. |
setMultiSelect |
Sets a new value for property multiSelect. Specifies whether multiple or single selection is used. When called with a value of Default value is
Since 1.20.0 replaced by <code>setMode</code> method. <code>FacetFilterList</code> overrides the <code>setMode</code> method to restrict the possible modes to <code>MultiSelect</code> and <code>SingleSelectMaster</code>. All other modes are ignored and will not be set.
|
setRetainListSequence |
Sets a new value for property retainListSequence. Retains the list sequence if it is inactive and made active again. When called with a value of Default value is |
setSelectedKeys |
Used to pre-select FacetFilterItems, such as when restoring FacetFilterList selections from a variant. Keys are cached separately from the actual FacetFilterItems so that they remain even when the physical items are removed by filtering or sorting. If aKeys is |
setSequence |
Sets a new value for property sequence. Sequence that determines the order in which FacetFilterList is shown on the FacetFilter. Lists are rendered by ascending order of sequence. When called with a value of Default value is |
setShowRemoveFacetIcon |
Sets a new value for property showRemoveFacetIcon. Specifies whether remove icon for facet is visible or hidden. When called with a value of Default value is |
setTitle |
Sets a new value for property title. Defines the title of the facet. The facet title is displayed on the facet button when the FacetFilter type is set to When called with a value of |
setWordWrap |
Sets a new value for property wordWrap. If set to When called with a value of Default value is |
Attaches event handler fnFunction
to the listClose event of this sap.m.FacetFilterList
.
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.m.FacetFilterList
itself.
Triggered after the list of items is 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 |
Attaches event handler fnFunction
to the listOpen event of this sap.m.FacetFilterList
.
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.m.FacetFilterList
itself.
Fired before the filter list is opened.
The default filtering behavior of the sap.m.FacetFilterList can be prevented by calling sap.ui.base.Event.prototype.preventDefault
function in the listOpen
event handler function. If the default filtering behavior is prevented then filtering behavior has to be defined at application level inside the listOpen
event handler function.
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 search event of this sap.m.FacetFilterList
.
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.m.FacetFilterList
itself.
Triggered after the Search button is pressed or by pressing Enter in search input field.
The default filtering behavior of the control can be prevented by calling sap.ui.base.Event.prototype.preventDefault
function in the search
event handler function. Preventing the default behavior is useful in cases when items aggregation could be taking long time fetching from the OData model. As a result, no list items are loaded initially. If the default filtering behavior is prevented then filtering behavior has to be defined at application level inside the search
event handler function.
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 listClose event of this sap.m.FacetFilterList
.
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 listOpen event of this sap.m.FacetFilterList
.
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 search event of this sap.m.FacetFilterList
.
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 |
Creates a new subclass of class sap.m.FacetFilterList with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.m.List.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 |
Fires event listClose to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
selectedItems | sap.m.FacetFilterItem[] |
Array of selected items. Items returned are only copies and therefore can only be used to read properties, not set them. |
|
allSelected | boolean |
|
|
selectedKeys | object |
Associative array containing the keys of selected FacetFilterItems. Unlike the selectedItems parameter, this contains only the keys for all selected items, not the items themselves. Being an associative array, each object property is the FacetFilterItem key value and the value of the property is the FacetFilterItem text. |
Fires event listOpen to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event search to attached listeners.
Listeners may prevent the default action of this event by calling the preventDefault
method on the event object. The return value of this method indicates whether the default action should be executed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
term | string |
Value received as user input in the |
Gets current value of property active.
Indicates that the list is displayed as a button when the FacetFilter type is set to Simple
.
Note: Set the showPersonalization
property of the FacetFilter
to true
when this property is set to false
. This is needed, as the non-active lists are not displayed, and without a personalization button they can't be selected by the user.
Default value is true
.
Gets current value of property allCount.
Determines the number of objects that match this item in the target data set when all filter items are selected.
Gets current value of property dataType.
FacetFilterList data type. Only String data type will provide search function.
Default value is String
.
Gets current value of property enableCaseInsensitiveSearch.
If set to true
, enables case-insensitive search for OData.
Default value is false
.
Gets current value of property multiSelect.
Specifies whether multiple or single selection is used.
Default value is true
.
Gets current value of property retainListSequence.
Retains the list sequence if it is inactive and made active again.
Default value is false
.
Returns the keys of the selected elements as an associative array. An empty object is returned if no items are selected.
Gets current value of property sequence.
Sequence that determines the order in which FacetFilterList is shown on the FacetFilter. Lists are rendered by ascending order of sequence.
Default value is -1
.
Gets current value of property showRemoveFacetIcon.
Specifies whether remove icon for facet is visible or hidden.
Default value is true
.
Gets current value of property title.
Defines the title of the facet. The facet title is displayed on the facet button when the FacetFilter type is set to Simple
. It is also displayed as a list item in the facet page of the dialog.
Gets current value of property wordWrap.
If set to true
, the item text wraps when it is too long.
Default value is false
.
Removes the specified key from the selected keys cache and deselects the item.
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
The key of the selected item to be removed from the cache. If |
|
sText | string |
The text of the selected item to be removed from the cache. If the key parameter is |
Sets a new value for property active.
Indicates that the list is displayed as a button when the FacetFilter type is set to Simple
.
Note: Set the showPersonalization
property of the FacetFilter
to true
when this property is set to false
. This is needed, as the non-active lists are not displayed, and without a personalization button they can't be selected by the user.
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 |
---|---|---|---|
bActive | boolean | true |
New value for property |
Sets a new value for property allCount.
Determines the number of objects that match this item in the target data set when all filter items are selected.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
iAllCount | int |
New value for property |
Sets a new value for property dataType.
FacetFilterList data type. Only String data type will provide search function.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is String
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDataType | sap.m.FacetFilterListDataType | String |
New value for property |
Sets a new value for property enableCaseInsensitiveSearch.
If set to true
, enables case-insensitive search for OData.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnableCaseInsensitiveSearch | boolean | false |
New value for property |
Sets a new value for property key.
Unique identifier for this filter list.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sKey | string |
New value for property |
Overrides to allow only MultiSelect and SingleSelectMaster list modes. If an invalid mode is given then the mode will not be changed.
Param | Type | DefaultValue | Description |
---|---|---|---|
mode | sap.m.ListMode |
The list mode |
Sets a new value for property multiSelect.
Specifies whether multiple or single selection is used.
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 |
---|---|---|---|
bMultiSelect | boolean | true |
New value for property |
Sets a new value for property retainListSequence.
Retains the list sequence if it is inactive and made active again.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bRetainListSequence | boolean | false |
New value for property |
Used to pre-select FacetFilterItems, such as when restoring FacetFilterList selections from a variant. Keys are cached separately from the actual FacetFilterItems so that they remain even when the physical items are removed by filtering or sorting. If aKeys is undefined
, null
, or {} (empty object) then all keys are deleted. After this method completes, only those items with matching keys will be selected. All other items in the list will be deselected.
Param | Type | DefaultValue | Description |
---|---|---|---|
oKeys | object |
Associative array indicating which FacetFilterItems should be selected in the list. Each property must be set to the value of a FacetFilterItem.key property. Each property value should be set to the FacetFilterItem.text property value. The text value is used to display the FacetFilterItem text when the FacetFilterList button or FacetFilter summary bar is displayed. If no property value is set then the property key is used for the text. |
Sets a new value for property sequence.
Sequence that determines the order in which FacetFilterList is shown on the FacetFilter. Lists are rendered by ascending order of sequence.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is -1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iSequence | int | -1 |
New value for property |
Sets a new value for property showRemoveFacetIcon.
Specifies whether remove icon for facet is visible or hidden.
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 |
---|---|---|---|
bShowRemoveFacetIcon | boolean | true |
New value for property |
Sets a new value for property title.
Defines the title of the facet. The facet title is displayed on the facet button when the FacetFilter type is set to Simple
. It is also displayed as a list item in the facet page of the dialog.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string |
New value for property |
Sets a new value for property wordWrap.
If set to true
, the item text wraps when it is too long.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bWordWrap | boolean | false |
New value for property |