class sap.m.ViewSettingsDialog

Control sample: sap.m.ViewSettingsDialog
Visiblity: public
UX Guidelines: View Settings Dialog
Implements:
Available since: N/A
Module: sap/m/ViewSettingsDialog
Application Component: CA-UI5-CTR

Helps the user to sort, filter, or group data within a (master) sap.m.List or a sap.m.Table. The dialog is triggered by icon buttons in the table toolbar. Each button shows a dropdown list icon.

Overview

The ViewSettingsDialog is a composite control, consisting of a modal sap.m.Popover and several internal lists. There are three different tabs (Sort, Group, Filter) in the dialog that can be activated by filling the respective associations. If only one association is filled, the other tabs are automatically hidden. The selected options can be used to create sorters and filters for the table.

Note: If the app does not offer all three sorting, filtering, and grouping operations, but only one of these (such as sort), we recommend placing the icon button directly in the toolbar. Do not place sort, filter, or group buttons in the footer toolbar if they refer to a table. Place group, sort, and filter buttons in the footer toolbar if they refer to a master list.

Note: If ViewSettingsDialog is used without custom tabs or custom items in any of its aggregations, then Reset button is enabled if the user selects any Filters or presetFilters or changes any of the Sort by, Sort order, Group by, or Group order values. When ViewSettingsDialog is used with custom tabs or custom items in any of its aggregations (sortItems, groupItems, filterItems or presetFilterItems), the Reset button is always enabled, because there is no way to determine the initial state of the custom tabs and compare it to their current state in order to determine the enable/disable state of the Reset button.

Usage

When to use?

When not to use?

Responsive behavior

The popover dialog appears as a modal window on desktop and tablet screen sizes, but full screen on smartphones.


Constructor

Constructor for a new ViewSettingsDialog.

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.ViewSettingsDialog(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
filterSearchOperator sap.m.StringFilterOperator StartsWith

Provides a string filter operator which is used when the user searches items in filter details page. Possible operators are: AnyWordStartsWith, Contains, StartsWith, Equals. This property will be ignored if a custom callback is provided through setFilterSearchCallback method.

Since: 1.42.

Visibility: public
groupDescending boolean false

Determines whether the group order is descending or ascending (default).

Visibility: public
sortDescending boolean false

Determines whether the sort order is descending or ascending (default).

Visibility: public
title string

Defines the title of the dialog. If not set and there is only one active tab, the dialog uses the default "View" or "Sort", "Group", "Filter" respectively.

Visibility: public
titleAlignment sap.m.TitleAlignment Auto

Specifies the Title alignment (theme specific). If set to TitleAlignment.None, the automatic title alignment depending on the theme settings will be disabled. If set to TitleAlignment.Auto, the Title will be aligned as it is set in the theme (if not set, the default value is center); Other possible values are TitleAlignment.Start (left or right depending on LTR/RTL), and TitleAlignment.Center (centered)

Since: 1.72.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
customTabs 0..n sap.m.ViewSettingsCustomTab

The list of all the custom tabs.

Since: 1.30.

filterItems 0..n sap.m.ViewSettingsItem

The list of items with key and value that can be filtered on (for example, a list of columns for a table). A filterItem is associated with one or more detail filters.

Note: It is recommended to use the sap.m.ViewSettingsFilterItem as it fits best at the filter page.

Since: 1.16.

groupItems 0..n sap.m.ViewSettingsItem

The list of items with key and value that can be grouped on (for example, a list of columns for a table).

Since: 1.16.

presetFilterItems 0..n sap.m.ViewSettingsItem

The list of preset filter items with key and value that allows the selection of more complex or custom filters. These entries are displayed at the top of the filter tab.

Since: 1.16.

sortItems 0..n sap.m.ViewSettingsItem

The list of items with key and value that can be sorted over (for example, a list of columns for a table).

Since: 1.16.


Associations

Name Cardinality Type Description
selectedGroupItem 0..1 sap.m.ViewSettingsItem

The group item that is selected. It can be set by either passing a key or the item itself to the function setSelectedGroupItem. By default 'None' is selected. You can restore back to 'None' by setting this association to empty value.

selectedPresetFilterItem 0..1 sap.m.ViewSettingsItem

The preset filter item that is selected. It can be set by either passing a key or the item itself to the function setSelectedPresetFilterItem. Note that either a preset filter OR multiple detail filters can be active at the same time.

selectedSortItem 0..1 sap.m.ViewSettingsItem

The sort item that is selected. It can be set by either passing a key or the item itself to the function setSelectedSortItem.


Events Overview

Event Description
cancel

Called when the Cancel button is pressed. It can be used to set the state of custom filter controls.

confirm

Indicates that the user has pressed the OK button and the selected sort, group, and filter settings should be applied to the data on this page.

Note: Custom tabs are not converted to event parameters automatically. For custom tabs, you have to read the state of your controls inside the callback of this event.

filterDetailPageOpened

Fired when the filter detail page is opened.

reset

Called when the Reset button is pressed. It can be used to set the state of custom tabs.

resetFilters

Called when the filters are being reset.

cancel

Called when the Cancel button is pressed. It can be used to set the state of custom filter controls.

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

confirm

Indicates that the user has pressed the OK button and the selected sort, group, and filter settings should be applied to the data on this page.

Note: Custom tabs are not converted to event parameters automatically. For custom tabs, you have to read the state of your controls inside the callback of this event.

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

The selected sort item.

sortDescending boolean

The selected sort order (true = descending, false = ascending).

groupItem sap.m.ViewSettingsItem

The selected group item.

groupDescending boolean

The selected group order (true = descending, false = ascending).

presetFilterItem sap.m.ViewSettingsItem

The selected preset filter item.

filterItems sap.m.ViewSettingsItem[]

The selected filters in an array of ViewSettingsItem.

filterKeys object

The selected filter items in an object notation format: { key: boolean }. If a custom control filter was displayed (for example, the user clicked on the filter item), the value for its key is set to true to indicate that there has been an interaction with the control.

filterCompoundKeys object

The selected filter items in an object notation format: { parentKey: { key: boolean, key2: boolean, ... }, ...}. If a custom control filter was displayed (for example, the user clicked on the filter item), the value for its key is set to true to indicate that there has been an interaction with the control.

Since: 1.42.

filterString string

The selected filter items in a string format to display in the control's header bar in format "Filtered by: key (subkey1, subkey2, subkey3)".

filterDetailPageOpened

Fired when the filter detail page is opened.

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

The filter item for which the details are opened.

reset

Called when the Reset button is pressed. It can be used to set the state of custom tabs.

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

resetFilters

Called when the filters are being reset.

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

Methods Overview

Method Description
addCustomTab

Overwrites the aggregation setter in order to have ID validation logic as some strings are reserved for the predefined tabs.

addFilterItem

Adds some filterItem to the aggregation filterItems.

addGroupItem

Adds a group item and sets the association to reflect the selected state.

addPresetFilterItem

Adds a preset filter item and sets the association to reflect the selected state.

addSortItem

Adds a sort item and sets the association to reflect the selected state.

addStyleClass

Forward method to the inner dialog method: addStyleClass.

attachCancel

Attaches event handler fnFunction to the cancel event of this sap.m.ViewSettingsDialog.

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

Called when the Cancel button is pressed. It can be used to set the state of custom filter controls.

attachConfirm

Attaches event handler fnFunction to the confirm event of this sap.m.ViewSettingsDialog.

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

Indicates that the user has pressed the OK button and the selected sort, group, and filter settings should be applied to the data on this page.

Note: Custom tabs are not converted to event parameters automatically. For custom tabs, you have to read the state of your controls inside the callback of this event.

attachFilterDetailPageOpened

Attaches event handler fnFunction to the filterDetailPageOpened event of this sap.m.ViewSettingsDialog.

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

Fired when the filter detail page is opened.

attachReset

Attaches event handler fnFunction to the reset event of this sap.m.ViewSettingsDialog.

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

Called when the Reset button is pressed. It can be used to set the state of custom tabs.

attachResetFilters

Attaches event handler fnFunction to the resetFilters event of this sap.m.ViewSettingsDialog.

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

Called when the filters are being reset.

bindCustomTabs

Binds aggregation customTabs to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

bindFilterItems

Binds aggregation filterItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

bindGroupItems

Binds aggregation groupItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

bindPresetFilterItems

Binds aggregation presetFilterItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

bindSortItems

Binds aggregation sortItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

clearFilters

Clears the selected filters and navigates to the filter overview page

destroyCustomTabs

Destroys all the customTabs in the aggregation customTabs.

destroyFilterItems

Destroys all the filterItems in the aggregation filterItems.

destroyGroupItems

Destroys all the groupItems in the aggregation groupItems.

destroyPresetFilterItems

Destroys all the presetFilterItems in the aggregation presetFilterItems.

destroySortItems

Destroys all the sortItems in the aggregation sortItems.

detachCancel

Detaches event handler fnFunction from the cancel event of this sap.m.ViewSettingsDialog.

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.m.ViewSettingsDialog.

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

detachFilterDetailPageOpened

Detaches event handler fnFunction from the filterDetailPageOpened event of this sap.m.ViewSettingsDialog.

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

detachReset

Detaches event handler fnFunction from the reset event of this sap.m.ViewSettingsDialog.

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

detachResetFilters

Detaches event handler fnFunction from the resetFilters event of this sap.m.ViewSettingsDialog.

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

sap.m.ViewSettingsDialog.extend

Creates a new subclass of class sap.m.ViewSettingsDialog 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.Control.extend.

fireCancel

Fires event cancel to attached listeners.

fireConfirm

Fires event confirm to attached listeners.

fireFilterDetailPageOpened

Fires event filterDetailPageOpened to attached listeners.

fireReset

Fires event reset to attached listeners.

fireResetFilters

Fires event resetFilters to attached listeners.

getCustomTabs

Gets content of aggregation customTabs.

The list of all the custom tabs.

getDomRef

Forward method to the inner dialog method: getDomRef.

getFilterItems

Gets content of aggregation filterItems.

The list of items with key and value that can be filtered on (for example, a list of columns for a table). A filterItem is associated with one or more detail filters.

Note: It is recommended to use the sap.m.ViewSettingsFilterItem as it fits best at the filter page.

getFilterSearchOperator

Gets current value of property filterSearchOperator.

Provides a string filter operator which is used when the user searches items in filter details page. Possible operators are: AnyWordStartsWith, Contains, StartsWith, Equals. This property will be ignored if a custom callback is provided through setFilterSearchCallback method.

Default value is StartsWith.

getGroupDescending

Gets current value of property groupDescending.

Determines whether the group order is descending or ascending (default).

Default value is false.

getGroupItems

Gets content of aggregation groupItems.

The list of items with key and value that can be grouped on (for example, a list of columns for a table).

sap.m.ViewSettingsDialog.getMetadata

Returns a metadata object for class sap.m.ViewSettingsDialog.

getPresetFilterItems

Gets content of aggregation presetFilterItems.

The list of preset filter items with key and value that allows the selection of more complex or custom filters. These entries are displayed at the top of the filter tab.

getSelectedFilterCompoundKeys

Gets the selected filter object in format { parent_key: { key: boolean, key2: boolean, ...}, ... }.

getSelectedFilterItems

Returns the selected filters as an array of ViewSettingsItems.

It can be used to create matching sorters and filters to apply the selected settings to the data.

getSelectedFilterKeys

Gets the selected filter object in format {key: boolean}.

It can be used to create matching sorters and filters to apply the selected settings to the data.

Since 1.42 replaced by <code>getSelectedFilterCompoundKeys</code> method
getSelectedFilterString

Gets the filter string in format: "filter name (subfilter1 name, subfilter2 name, ...), ...". For custom and preset filters it will only add the filter name to the resulting string.

getSelectedGroupItem

ID of the element which is the current target of the association selectedGroupItem, or null.

getSelectedPresetFilterItem

ID of the element which is the current target of the association selectedPresetFilterItem, or null.

getSelectedSortItem

ID of the element which is the current target of the association selectedSortItem, or null.

getSortDescending

Gets current value of property sortDescending.

Determines whether the sort order is descending or ascending (default).

Default value is false.

getSortItems

Gets content of aggregation sortItems.

The list of items with key and value that can be sorted over (for example, a list of columns for a table).

getTitle

Gets current value of property title.

Defines the title of the dialog. If not set and there is only one active tab, the dialog uses the default "View" or "Sort", "Group", "Filter" respectively.

getTitleAlignment

Gets current value of property titleAlignment.

Specifies the Title alignment (theme specific). If set to TitleAlignment.None, the automatic title alignment depending on the theme settings will be disabled. If set to TitleAlignment.Auto, the Title will be aligned as it is set in the theme (if not set, the default value is center); Other possible values are TitleAlignment.Start (left or right depending on LTR/RTL), and TitleAlignment.Center (centered)

Default value is Auto.

hasStyleClass

Forward method to the inner dialog method: hasStyleClass.

indexOfCustomTab

Checks for the provided sap.m.ViewSettingsCustomTab in the aggregation customTabs. and returns its index if found or -1 otherwise.

indexOfFilterItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation filterItems. and returns its index if found or -1 otherwise.

indexOfGroupItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation groupItems. and returns its index if found or -1 otherwise.

indexOfPresetFilterItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation presetFilterItems. and returns its index if found or -1 otherwise.

indexOfSortItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation sortItems. and returns its index if found or -1 otherwise.

insertCustomTab

Inserts a customTab into the aggregation customTabs.

insertFilterItem

Inserts a filterItem into the aggregation filterItems.

insertGroupItem

Inserts a groupItem into the aggregation groupItems.

insertPresetFilterItem

Inserts a presetFilterItem into the aggregation presetFilterItems.

insertSortItem

Inserts a sortItem into the aggregation sortItems.

open

Opens the ViewSettingsDialog relative to the parent control.

removeAllCustomTabs

Removes all the controls from the aggregation customTabs.

Additionally, it unregisters them from the hosting UIArea.

removeAllFilterItems

Removes all filter Items and resets the remembered page if it was a filter detail page and all of its filter items are being removed.

removeAllGroupItems

Removes all the controls from the aggregation groupItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllPresetFilterItems

Removes all the controls from the aggregation presetFilterItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllSortItems

Removes all the controls from the aggregation sortItems.

Additionally, it unregisters them from the hosting UIArea.

removeCustomTab

Removes a customTab from the aggregation customTabs.

removeFilterItem

Removes a filter Item and resets the remembered page if it was the filter detail page of the removed filter.

removeGroupItem

Removes a groupItem from the aggregation groupItems.

removePresetFilterItem

Removes a presetFilterItem from the aggregation presetFilterItems.

removeSortItem

Removes a sortItem from the aggregation sortItems.

removeStyleClass

Forward method to the inner dialog method: removeStyleClass.

setBusy

Forward the busy state setting to the internal dialog instance. Needed because of the not-bullet proof implementation of setBusy in sap.ui.core.Control

setFilterSearchCallback

Sets a callback that will check the ViewSettingsItem's text against the search query. If a callback is set, filterSearchOperator property will be ignored, as it serves the same purpose.

setFilterSearchOperator

Sets a new value for property filterSearchOperator.

Provides a string filter operator which is used when the user searches items in filter details page. Possible operators are: AnyWordStartsWith, Contains, StartsWith, Equals. This property will be ignored if a custom callback is provided through setFilterSearchCallback method.

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

Default value is StartsWith.

setGroupDescending

Sets a new value for property groupDescending.

Determines whether the group order is descending or ascending (default).

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

Default value is false.

setSelectedFilterCompoundKeys

Sets the selected filter object in format { parent_key: { key: boolean, key2: boolean, ...}, ... }.

setSelectedFilterKeys

Sets the selected filter object in format {key: boolean}. Note: Do not use duplicated item keys with this method.

Since 1.42 replaced by <code>setSelectedFilterCompoundKeys</code> method
setSelectedGroupItem

Sets the selected group item (either by key or by item).

setSelectedPresetFilterItem

Sets the selected preset filter item.

setSelectedSortItem

Sets the selected sort item (either by key or by item).

setSortDescending

Sets a new value for property sortDescending.

Determines whether the sort order is descending or ascending (default).

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

Default value is false.

setTitle

Sets the title of the internal dialog.

setTitleAlignment

Sets a new value for property titleAlignment.

Specifies the Title alignment (theme specific). If set to TitleAlignment.None, the automatic title alignment depending on the theme settings will be disabled. If set to TitleAlignment.Auto, the Title will be aligned as it is set in the theme (if not set, the default value is center); Other possible values are TitleAlignment.Start (left or right depending on LTR/RTL), and TitleAlignment.Center (centered)

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

Default value is Auto.

toggleStyleClass

Forward method to the inner dialog method: toggleStyleClass.

unbindCustomTabs

Unbinds aggregation customTabs from model data.

unbindFilterItems

Unbinds aggregation filterItems from model data.

unbindGroupItems

Unbinds aggregation groupItems from model data.

unbindPresetFilterItems

Unbinds aggregation presetFilterItems from model data.

unbindSortItems

Unbinds aggregation sortItems from model data.

addCustomTab

Overwrites the aggregation setter in order to have ID validation logic as some strings are reserved for the predefined tabs.

Param Type DefaultValue Description
oCustomTab object

The custom tab to be added

addFilterItem

Adds some filterItem to the aggregation filterItems.

Param Type DefaultValue Description
oFilterItem sap.m.ViewSettingsItem

The filterItem to add; if empty, nothing is inserted

addGroupItem

Adds a group item and sets the association to reflect the selected state.

Param Type DefaultValue Description
oItem sap.m.ViewSettingsItem

The item to be added to the group items

addPresetFilterItem

Adds a preset filter item and sets the association to reflect the selected state.

Param Type DefaultValue Description
oItem sap.m.ViewSettingsItem

The selected item or a string with the key

addSortItem

Adds a sort item and sets the association to reflect the selected state.

Param Type DefaultValue Description
oItem sap.m.ViewSettingsItem

The item to be added to the aggregation

addStyleClass

Forward method to the inner dialog method: addStyleClass.

Param Type DefaultValue Description
sStyleClass string

CSS class name to add

attachCancel

Attaches event handler fnFunction to the cancel event of this sap.m.ViewSettingsDialog.

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

Called when the Cancel button is pressed. It can be used to set the state of custom filter controls.

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.m.ViewSettingsDialog itself

attachConfirm

Attaches event handler fnFunction to the confirm event of this sap.m.ViewSettingsDialog.

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

Indicates that the user has pressed the OK button and the selected sort, group, and filter settings should be applied to the data on this page.

Note: Custom tabs are not converted to event parameters automatically. For custom tabs, you have to read the state of your controls inside the callback of this event.

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.m.ViewSettingsDialog itself

attachFilterDetailPageOpened

Attaches event handler fnFunction to the filterDetailPageOpened event of this sap.m.ViewSettingsDialog.

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

Fired when the filter detail page 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.m.ViewSettingsDialog itself

attachReset

Attaches event handler fnFunction to the reset event of this sap.m.ViewSettingsDialog.

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

Called when the Reset button is pressed. It can be used to set the state of custom tabs.

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.m.ViewSettingsDialog itself

attachResetFilters

Attaches event handler fnFunction to the resetFilters event of this sap.m.ViewSettingsDialog.

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

Called when the filters are being reset.

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.m.ViewSettingsDialog itself

bindCustomTabs

Binds aggregation customTabs to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

bindFilterItems

Binds aggregation filterItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

bindGroupItems

Binds aggregation groupItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

bindPresetFilterItems

Binds aggregation presetFilterItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

bindSortItems

Binds aggregation sortItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

clearFilters

Clears the selected filters and navigates to the filter overview page

destroyCustomTabs

Destroys all the customTabs in the aggregation customTabs.

destroyFilterItems

Destroys all the filterItems in the aggregation filterItems.

destroyGroupItems

Destroys all the groupItems in the aggregation groupItems.

destroyPresetFilterItems

Destroys all the presetFilterItems in the aggregation presetFilterItems.

destroySortItems

Destroys all the sortItems in the aggregation sortItems.

detachCancel

Detaches event handler fnFunction from the cancel event of this sap.m.ViewSettingsDialog.

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.m.ViewSettingsDialog.

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

detachFilterDetailPageOpened

Detaches event handler fnFunction from the filterDetailPageOpened event of this sap.m.ViewSettingsDialog.

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

detachReset

Detaches event handler fnFunction from the reset event of this sap.m.ViewSettingsDialog.

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

detachResetFilters

Detaches event handler fnFunction from the resetFilters event of this sap.m.ViewSettingsDialog.

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.m.ViewSettingsDialog.extend

Creates a new subclass of class sap.m.ViewSettingsDialog 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.Control.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

sortItem sap.m.ViewSettingsItem

The selected sort item.

sortDescending boolean

The selected sort order (true = descending, false = ascending).

groupItem sap.m.ViewSettingsItem

The selected group item.

groupDescending boolean

The selected group order (true = descending, false = ascending).

presetFilterItem sap.m.ViewSettingsItem

The selected preset filter item.

filterItems sap.m.ViewSettingsItem[]

The selected filters in an array of ViewSettingsItem.

filterKeys object

The selected filter items in an object notation format: { key: boolean }. If a custom control filter was displayed (for example, the user clicked on the filter item), the value for its key is set to true to indicate that there has been an interaction with the control.

filterCompoundKeys object

The selected filter items in an object notation format: { parentKey: { key: boolean, key2: boolean, ... }, ...}. If a custom control filter was displayed (for example, the user clicked on the filter item), the value for its key is set to true to indicate that there has been an interaction with the control.

filterString string

The selected filter items in a string format to display in the control's header bar in format "Filtered by: key (subkey1, subkey2, subkey3)".

fireFilterDetailPageOpened

Fires event filterDetailPageOpened to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

parentFilterItem sap.m.ViewSettingsFilterItem

The filter item for which the details are opened.

fireReset

Fires event reset to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireResetFilters

Fires event resetFilters to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getCustomTabs

Gets content of aggregation customTabs.

The list of all the custom tabs.

getDomRef

Forward method to the inner dialog method: getDomRef.

getFilterItems

Gets content of aggregation filterItems.

The list of items with key and value that can be filtered on (for example, a list of columns for a table). A filterItem is associated with one or more detail filters.

Note: It is recommended to use the sap.m.ViewSettingsFilterItem as it fits best at the filter page.

getFilterSearchOperator

Gets current value of property filterSearchOperator.

Provides a string filter operator which is used when the user searches items in filter details page. Possible operators are: AnyWordStartsWith, Contains, StartsWith, Equals. This property will be ignored if a custom callback is provided through setFilterSearchCallback method.

Default value is StartsWith.

getGroupDescending

Gets current value of property groupDescending.

Determines whether the group order is descending or ascending (default).

Default value is false.

getGroupItems

Gets content of aggregation groupItems.

The list of items with key and value that can be grouped on (for example, a list of columns for a table).

sap.m.ViewSettingsDialog.getMetadata

Returns a metadata object for class sap.m.ViewSettingsDialog.

getPresetFilterItems

Gets content of aggregation presetFilterItems.

The list of preset filter items with key and value that allows the selection of more complex or custom filters. These entries are displayed at the top of the filter tab.

getSelectedFilterCompoundKeys

Gets the selected filter object in format { parent_key: { key: boolean, key2: boolean, ...}, ... }.

getSelectedFilterItems

Returns the selected filters as an array of ViewSettingsItems.

It can be used to create matching sorters and filters to apply the selected settings to the data.

getSelectedFilterKeys

Gets the selected filter object in format {key: boolean}.

It can be used to create matching sorters and filters to apply the selected settings to the data.

Since 1.42 replaced by <code>getSelectedFilterCompoundKeys</code> method

getSelectedFilterString

Gets the filter string in format: "filter name (subfilter1 name, subfilter2 name, ...), ...". For custom and preset filters it will only add the filter name to the resulting string.

getSelectedGroupItem

ID of the element which is the current target of the association selectedGroupItem, or null.

getSelectedPresetFilterItem

ID of the element which is the current target of the association selectedPresetFilterItem, or null.

getSelectedSortItem

ID of the element which is the current target of the association selectedSortItem, or null.

getSortDescending

Gets current value of property sortDescending.

Determines whether the sort order is descending or ascending (default).

Default value is false.

getSortItems

Gets content of aggregation sortItems.

The list of items with key and value that can be sorted over (for example, a list of columns for a table).

getTitle

Gets current value of property title.

Defines the title of the dialog. If not set and there is only one active tab, the dialog uses the default "View" or "Sort", "Group", "Filter" respectively.

getTitleAlignment

Gets current value of property titleAlignment.

Specifies the Title alignment (theme specific). If set to TitleAlignment.None, the automatic title alignment depending on the theme settings will be disabled. If set to TitleAlignment.Auto, the Title will be aligned as it is set in the theme (if not set, the default value is center); Other possible values are TitleAlignment.Start (left or right depending on LTR/RTL), and TitleAlignment.Center (centered)

Default value is Auto.

hasStyleClass

Forward method to the inner dialog method: hasStyleClass.

indexOfCustomTab

Checks for the provided sap.m.ViewSettingsCustomTab in the aggregation customTabs. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oCustomTab sap.m.ViewSettingsCustomTab

The customTab whose index is looked for

indexOfFilterItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation filterItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oFilterItem sap.m.ViewSettingsItem

The filterItem whose index is looked for

indexOfGroupItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation groupItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oGroupItem sap.m.ViewSettingsItem

The groupItem whose index is looked for

indexOfPresetFilterItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation presetFilterItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oPresetFilterItem sap.m.ViewSettingsItem

The presetFilterItem whose index is looked for

indexOfSortItem

Checks for the provided sap.m.ViewSettingsItem in the aggregation sortItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oSortItem sap.m.ViewSettingsItem

The sortItem whose index is looked for

insertCustomTab

Inserts a customTab into the aggregation customTabs.

Param Type DefaultValue Description
oCustomTab sap.m.ViewSettingsCustomTab

The customTab to insert; if empty, nothing is inserted

iIndex int

The 0-based index the customTab should be inserted at; for a negative value of iIndex, the customTab is inserted at position 0; for a value greater than the current size of the aggregation, the customTab is inserted at the last position

insertFilterItem

Inserts a filterItem into the aggregation filterItems.

Param Type DefaultValue Description
oFilterItem sap.m.ViewSettingsItem

The filterItem to insert; if empty, nothing is inserted

iIndex int

The 0-based index the filterItem should be inserted at; for a negative value of iIndex, the filterItem is inserted at position 0; for a value greater than the current size of the aggregation, the filterItem is inserted at the last position

insertGroupItem

Inserts a groupItem into the aggregation groupItems.

Param Type DefaultValue Description
oGroupItem sap.m.ViewSettingsItem

The groupItem to insert; if empty, nothing is inserted

iIndex int

The 0-based index the groupItem should be inserted at; for a negative value of iIndex, the groupItem is inserted at position 0; for a value greater than the current size of the aggregation, the groupItem is inserted at the last position

insertPresetFilterItem

Inserts a presetFilterItem into the aggregation presetFilterItems.

Param Type DefaultValue Description
oPresetFilterItem sap.m.ViewSettingsItem

The presetFilterItem to insert; if empty, nothing is inserted

iIndex int

The 0-based index the presetFilterItem should be inserted at; for a negative value of iIndex, the presetFilterItem is inserted at position 0; for a value greater than the current size of the aggregation, the presetFilterItem is inserted at the last position

insertSortItem

Inserts a sortItem into the aggregation sortItems.

Param Type DefaultValue Description
oSortItem sap.m.ViewSettingsItem

The sortItem to insert; if empty, nothing is inserted

iIndex int

The 0-based index the sortItem should be inserted at; for a negative value of iIndex, the sortItem is inserted at position 0; for a value greater than the current size of the aggregation, the sortItem is inserted at the last position

open

Opens the ViewSettingsDialog relative to the parent control.

Param Type DefaultValue Description
sPageId string

The ID of the initial page to be opened in the dialog. The available values are "sort", "group", "filter" or IDs of custom tabs.

removeAllCustomTabs

Removes all the controls from the aggregation customTabs.

Additionally, it unregisters them from the hosting UIArea.

removeAllFilterItems

Removes all filter Items and resets the remembered page if it was a filter detail page and all of its filter items are being removed.

removeAllGroupItems

Removes all the controls from the aggregation groupItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllPresetFilterItems

Removes all the controls from the aggregation presetFilterItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllSortItems

Removes all the controls from the aggregation sortItems.

Additionally, it unregisters them from the hosting UIArea.

removeCustomTab

Removes a customTab from the aggregation customTabs.

Param Type DefaultValue Description
vCustomTab int string sap.m.ViewSettingsCustomTab

The customTab to remove or its index or id

removeFilterItem

Removes a filter Item and resets the remembered page if it was the filter detail page of the removed filter.

Param Type DefaultValue Description
vFilterItem int sap.m.ViewSettingsFilterItem string

The filter item's index, or the item itself, or its id

removeGroupItem

Removes a groupItem from the aggregation groupItems.

Param Type DefaultValue Description
vGroupItem int string sap.m.ViewSettingsItem

The groupItem to remove or its index or id

removePresetFilterItem

Removes a presetFilterItem from the aggregation presetFilterItems.

Param Type DefaultValue Description
vPresetFilterItem int string sap.m.ViewSettingsItem

The presetFilterItem to remove or its index or id

removeSortItem

Removes a sortItem from the aggregation sortItems.

Param Type DefaultValue Description
vSortItem int string sap.m.ViewSettingsItem

The sortItem to remove or its index or id

removeStyleClass

Forward method to the inner dialog method: removeStyleClass.

Param Type DefaultValue Description
sStyleClass string

CSS class name to remove

setBusy

Forward the busy state setting to the internal dialog instance. Needed because of the not-bullet proof implementation of setBusy in sap.ui.core.Control

Param Type DefaultValue Description
bBusy boolean

The busy state flag

setFilterSearchCallback

Sets a callback that will check the ViewSettingsItem's text against the search query. If a callback is set, filterSearchOperator property will be ignored, as it serves the same purpose.

Param Type DefaultValue Description
fnTest function

A function that accepts two parameters fnTest({string} query, {string} value) and returns boolean if the value satisfies the query.

setFilterSearchOperator

Sets a new value for property filterSearchOperator.

Provides a string filter operator which is used when the user searches items in filter details page. Possible operators are: AnyWordStartsWith, Contains, StartsWith, Equals. This property will be ignored if a custom callback is provided through setFilterSearchCallback method.

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

Default value is StartsWith.

Param Type DefaultValue Description
sFilterSearchOperator sap.m.StringFilterOperator StartsWith

New value for property filterSearchOperator

setGroupDescending

Sets a new value for property groupDescending.

Determines whether the group order is descending or ascending (default).

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
bGroupDescending boolean false

New value for property groupDescending

setSelectedFilterCompoundKeys

Sets the selected filter object in format { parent_key: { key: boolean, key2: boolean, ...}, ... }.

Param Type DefaultValue Description
oSelectedFilterKeys object

A configuration object with filter item and sub item keys in the format: { parent_key: { key: boolean, key2: boolean, ...}, ... }. Setting boolean to true will set the filter to true, false or omitting an entry will set the filter to false. It can be used to set the dialog state based on presets.

setSelectedFilterKeys

Sets the selected filter object in format {key: boolean}. Note: Do not use duplicated item keys with this method.

Since 1.42 replaced by <code>setSelectedFilterCompoundKeys</code> method
Param Type DefaultValue Description
oSelectedFilterKeys object

A configuration object with filter item and sub item keys in the format: { key: boolean }. Setting boolean to true will set the filter to true, false or omitting an entry will set the filter to false. It can be used to set the dialog state based on presets.

setSelectedGroupItem

Sets the selected group item (either by key or by item).

Param Type DefaultValue Description
vItemOrKey sap.m.ViewSettingsItem string

The selected item or the item's key string

setSelectedPresetFilterItem

Sets the selected preset filter item.

Param Type DefaultValue Description
vItemOrKey sap.m.ViewSettingsItem string null

The selected item or the item's key string

setSelectedSortItem

Sets the selected sort item (either by key or by item).

Param Type DefaultValue Description
vItemOrKey sap.m.ViewSettingsItem string

The selected item or the item's key string

setSortDescending

Sets a new value for property sortDescending.

Determines whether the sort order is descending or ascending (default).

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
bSortDescending boolean false

New value for property sortDescending

setTitle

Sets the title of the internal dialog.

Param Type DefaultValue Description
sTitle string

The title text for the dialog

setTitleAlignment

Sets a new value for property titleAlignment.

Specifies the Title alignment (theme specific). If set to TitleAlignment.None, the automatic title alignment depending on the theme settings will be disabled. If set to TitleAlignment.Auto, the Title will be aligned as it is set in the theme (if not set, the default value is center); Other possible values are TitleAlignment.Start (left or right depending on LTR/RTL), and TitleAlignment.Center (centered)

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

Default value is Auto.

Param Type DefaultValue Description
sTitleAlignment sap.m.TitleAlignment Auto

New value for property titleAlignment

toggleStyleClass

Forward method to the inner dialog method: toggleStyleClass.

Param Type DefaultValue Description
sStyleClass string

CSS class name to add or remove

bAdd boolean

Whether style class should be added (or removed); when this parameter is not given, the given style class will be toggled (removed, if present, and added if not present)

unbindCustomTabs

Unbinds aggregation customTabs from model data.

unbindFilterItems

Unbinds aggregation filterItems from model data.

unbindGroupItems

Unbinds aggregation groupItems from model data.

unbindPresetFilterItems

Unbinds aggregation presetFilterItems from model data.

unbindSortItems

Unbinds aggregation sortItems from model data.