Class sap.m.ViewSettingsDialogModule: sap/m/ViewSettingsDialog

extends Control

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 functionalities, 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.

Usage

When to use?

  • If you need to allow the user to sort line items in a manageable list or table (up to 20 columns)
  • If you need to offer custom filter settings in a manageable list or table (up to 20 columns)
  • If you need to allow the user to group line items in a manageable list or table (up to 20 columns)

When not to use?

  • If you have complex tables (more than 20 columns)
  • If you need to rearrange columns within your table (use the sap.m.TablePersoDialog instead)
  • If you need very specific sort, filter, or column sorting options within complex tables (use the sap.m.P13nDialog instead)

Responsive behavior

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


Since: 1.16.
Constructor Summary
new sap.m.ViewSettingsDialog(sId?, mSettings?)Constructor for a new ViewSettingsDialog.
Event Summary
cancel(oControlEvent)Called when the Cancel button is pressed.
confirm(oControlEvent)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.
filterDetailPageOpened(oControlEvent)Fired when the filter detail page is opened.
resetFilters(oControlEvent)Called when the reset filters button is pressed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.ViewSettingsDialog.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.ViewSettingsDialog with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.ViewSettingsDialog.getMetadata()Returns a metadata object for class sap.m.ViewSettingsDialog.
addCustomTab(oCustomTab)Overwrites the aggregation setter in order to have ID validation logic as some strings are reserved for the predefined tabs.
addFilterItem(oFilterItem)Adds some filterItem to the aggregation filterItems.
addGroupItem(oItem)Adds a group item and sets the association to reflect the selected state.
addPresetFilterItem(oItem)Adds a preset filter item and sets the association to reflect the selected state.
addSortItem(oItem)Adds a sort item and sets the association to reflect the selected state.
attachCancel(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the cancel event of this sap.m.ViewSettingsDialog.
attachConfirm(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the confirm event of this sap.m.ViewSettingsDialog.
attachFilterDetailPageOpened(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the filterDetailPageOpened event of this sap.m.ViewSettingsDialog.
attachResetFilters(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the resetFilters event of this sap.m.ViewSettingsDialog.
bindCustomTabs(oBindingInfo)Binds aggregation customTabs to model data.
bindFilterItems(oBindingInfo)Binds aggregation filterItems to model data.
bindGroupItems(oBindingInfo)Binds aggregation groupItems to model data.
bindPresetFilterItems(oBindingInfo)Binds aggregation presetFilterItems to model data.
bindSortItems(oBindingInfo)Binds aggregation sortItems to model data.
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(fnFunction, oListener)Detaches event handler fnFunction from the cancel event of this sap.m.ViewSettingsDialog.
detachConfirm(fnFunction, oListener)Detaches event handler fnFunction from the confirm event of this sap.m.ViewSettingsDialog.
detachFilterDetailPageOpened(fnFunction, oListener)Detaches event handler fnFunction from the filterDetailPageOpened event of this sap.m.ViewSettingsDialog.
detachResetFilters(fnFunction, oListener)Detaches event handler fnFunction from the resetFilters event of this sap.m.ViewSettingsDialog.
fireCancel(mParameters?)Fires event cancel to attached listeners.
fireConfirm(mParameters?)Fires event confirm to attached listeners.
fireFilterDetailPageOpened(mParameters?)Fires event filterDetailPageOpened to attached listeners.
fireResetFilters(mParameters?)Fires event resetFilters to attached listeners.
getCustomTabs()Gets content of aggregation customTabs.
getFilterItems()Gets content of aggregation filterItems.
getFilterSearchOperator()Gets current value of property filterSearchOperator.
getGroupDescending()Gets current value of property groupDescending.
getGroupItems()Gets content of aggregation groupItems.
getPresetFilterItems()Gets content of aggregation presetFilterItems.
getSelectedFilterCompoundKeys()Gets the selected filter object in format { parent_key: { key: boolean, key2: boolean, .
getSelectedFilterItems()Returns the selected filters as an array of ViewSettingsItems.
getSelectedFilterString()Gets the filter string in format: "filter name (subfilter1 name, subfilter2 name, .
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.
getSortItems()Gets content of aggregation sortItems.
getTitle()Gets current value of property title.
indexOfCustomTab(oCustomTab)Checks for the provided sap.m.ViewSettingsCustomTab in the aggregation customTabs.
indexOfFilterItem(oFilterItem)Checks for the provided sap.m.ViewSettingsItem in the aggregation filterItems.
indexOfGroupItem(oGroupItem)Checks for the provided sap.m.ViewSettingsItem in the aggregation groupItems.
indexOfPresetFilterItem(oPresetFilterItem)Checks for the provided sap.m.ViewSettingsItem in the aggregation presetFilterItems.
indexOfSortItem(oSortItem)Checks for the provided sap.m.ViewSettingsItem in the aggregation sortItems.
insertCustomTab(oCustomTab, iIndex)Inserts a customTab into the aggregation customTabs.
insertFilterItem(oFilterItem, iIndex)Inserts a filterItem into the aggregation filterItems.
insertGroupItem(oGroupItem, iIndex)Inserts a groupItem into the aggregation groupItems.
insertPresetFilterItem(oPresetFilterItem, iIndex)Inserts a presetFilterItem into the aggregation presetFilterItems.
insertSortItem(oSortItem, iIndex)Inserts a sortItem into the aggregation sortItems.
open(sPageId?)Opens the ViewSettingsDialog relative to the parent control.
removeAllCustomTabs()Removes all the controls from the aggregation customTabs.
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.
removeAllPresetFilterItems()Removes all the controls from the aggregation presetFilterItems.
removeAllSortItems()Removes all the controls from the aggregation sortItems.
removeCustomTab(vCustomTab)Removes a customTab from the aggregation customTabs.
removeFilterItem(vFilterItem)Removes a filter Item and resets the remembered page if it was the filter detail page of the removed filter.
removeGroupItem(vGroupItem)Removes a groupItem from the aggregation groupItems.
removePresetFilterItem(vPresetFilterItem)Removes a presetFilterItem from the aggregation presetFilterItems.
removeSortItem(vSortItem)Removes a sortItem from the aggregation sortItems.
setBusy(bBusy)Forward the busy state setting to the internal dialog instance.
setFilterSearchCallback(fnTest)Sets a callback that will check the ViewSettingsItem's text against the search query.
setFilterSearchOperator(sFilterSearchOperator)Sets a new value for property filterSearchOperator.
setGroupDescending(bGroupDescending)Sets a new value for property groupDescending.
setSelectedFilterCompoundKeys(oSelectedFilterKeys)Sets the selected filter object in format { parent_key: { key: boolean, key2: boolean, .
setSelectedGroupItem(vItemOrKey)Sets the selected group item (either by key or by item).
setSelectedPresetFilterItem(vItemOrKey)Sets the selected preset filter item.
setSelectedSortItem(vItemOrKey)Sets the selected sort item (either by key or by item).
setSortDescending(bSortDescending)Sets a new value for property sortDescending.
setTitle(sTitle)Sets the title of the internal dialog.
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.
getSelectedFilterKeys()Gets the selected filter object in format {key: boolean}.
setSelectedFilterKeys(oSelectedFilterKeys)Sets the selected filter object in format {key: boolean}.
Constructor Detail
new sap.m.ViewSettingsDialog(sId?, mSettings?)

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 for a general description of the syntax of the settings object.

The supported settings are:

  • Properties

  • Aggregations

  • Associations

  • Events

    • confirm : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • cancel : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • resetFilters : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • filterDetailPageOpened : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Event Detail
cancel(oControlEvent)
Called when the Cancel button is pressed. It can be used to set the state of custom filter controls.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
confirm(oControlEvent)
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.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.m.ViewSettingsItemoControlEvent.getParameters.sortItemThe selected sort item.
booleanoControlEvent.getParameters.sortDescendingThe selected sort order (true = descending, false = ascending).
sap.m.ViewSettingsItemoControlEvent.getParameters.groupItemThe selected group item.
booleanoControlEvent.getParameters.groupDescendingThe selected group order (true = descending, false = ascending).
sap.m.ViewSettingsItemoControlEvent.getParameters.presetFilterItemThe selected preset filter item.
sap.m.ViewSettingsItem[]oControlEvent.getParameters.filterItemsThe selected filters in an array of ViewSettingsItem.
objectoControlEvent.getParameters.filterKeysThe 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.
objectoControlEvent.getParameters.filterCompoundKeysThe 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.
stringoControlEvent.getParameters.filterStringThe selected filter items in a string format to display in the control's header bar in format "Filtered by: key (subkey1, subkey2, subkey3)".
filterDetailPageOpened(oControlEvent)
Fired when the filter detail page is opened.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.m.ViewSettingsFilterItemoControlEvent.getParameters.parentFilterItemThe filter item for which the details are opened.
resetFilters(oControlEvent)
Called when the reset filters button is pressed. It can be used to clear the state of custom filter controls.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Method Detail
sap.m.ViewSettingsDialog.extend(sClassName, oClassInfo?, FNMetaImpl?): function

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.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.ViewSettingsDialog.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.ViewSettingsDialog.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addCustomTab(oCustomTab): sap.m.ViewSettingsDialog
Overwrites the aggregation setter in order to have ID validation logic as some strings are reserved for the predefined tabs.
Parameters:
objectoCustomTabThe custom tab to be added
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
addFilterItem(oFilterItem): sap.m.ViewSettingsDialog
Adds some filterItem to the aggregation filterItems.
Parameters:
sap.m.ViewSettingsItemoFilterItemthe filterItem to add; if empty, nothing is inserted
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
addGroupItem(oItem): sap.m.ViewSettingsDialog
Adds a group item and sets the association to reflect the selected state.
Parameters:
sap.m.ViewSettingsItemoItemThe item to be added to the group items
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
addPresetFilterItem(oItem): sap.m.ViewSettingsDialog
Adds a preset filter item and sets the association to reflect the selected state.
Parameters:
sap.m.ViewSettingsItemoItemThe selected item or a string with the key
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
addSortItem(oItem): sap.m.ViewSettingsDialog
Adds a sort item and sets the association to reflect the selected state.
Parameters:
sap.m.ViewSettingsItemoItemThe item to be added to the aggregation
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
attachCancel(oData?, fnFunction, oListener?): sap.m.ViewSettingsDialog

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.ViewSettingsDialog itself
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
attachConfirm(oData?, fnFunction, oListener?): sap.m.ViewSettingsDialog

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.ViewSettingsDialog itself
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
attachFilterDetailPageOpened(oData?, fnFunction, oListener?): sap.m.ViewSettingsDialog

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.ViewSettingsDialog itself
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
attachResetFilters(oData?, fnFunction, oListener?): sap.m.ViewSettingsDialog

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 reset filters button is pressed. It can be used to clear the state of custom filter controls.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.ViewSettingsDialog itself
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
bindCustomTabs(oBindingInfo): sap.m.ViewSettingsDialog

Binds aggregation customTabs to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.30
bindFilterItems(oBindingInfo): sap.m.ViewSettingsDialog

Binds aggregation filterItems to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
bindGroupItems(oBindingInfo): sap.m.ViewSettingsDialog

Binds aggregation groupItems to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
bindPresetFilterItems(oBindingInfo): sap.m.ViewSettingsDialog

Binds aggregation presetFilterItems to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
bindSortItems(oBindingInfo): sap.m.ViewSettingsDialog

Binds aggregation sortItems to model data.

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

Parameters:
objectoBindingInfoThe binding information
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
destroyCustomTabs(): sap.m.ViewSettingsDialog
Destroys all the customTabs in the aggregation customTabs.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.30
destroyFilterItems(): sap.m.ViewSettingsDialog
Destroys all the filterItems in the aggregation filterItems.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
destroyGroupItems(): sap.m.ViewSettingsDialog
Destroys all the groupItems in the aggregation groupItems.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
destroyPresetFilterItems(): sap.m.ViewSettingsDialog
Destroys all the presetFilterItems in the aggregation presetFilterItems.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
destroySortItems(): sap.m.ViewSettingsDialog
Destroys all the sortItems in the aggregation sortItems.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
detachCancel(fnFunction, oListener): sap.m.ViewSettingsDialog

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
detachConfirm(fnFunction, oListener): sap.m.ViewSettingsDialog

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
detachFilterDetailPageOpened(fnFunction, oListener): sap.m.ViewSettingsDialog

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
detachResetFilters(fnFunction, oListener): sap.m.ViewSettingsDialog

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
fireCancel(mParameters?): sap.m.ViewSettingsDialog
Fires event cancel to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
fireConfirm(mParameters?): sap.m.ViewSettingsDialog
Fires event confirm to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.m.ViewSettingsItemmParameters.sortItem?The selected sort item.
booleanmParameters.sortDescending?The selected sort order (true = descending, false = ascending).
sap.m.ViewSettingsItemmParameters.groupItem?The selected group item.
booleanmParameters.groupDescending?The selected group order (true = descending, false = ascending).
sap.m.ViewSettingsItemmParameters.presetFilterItem?The selected preset filter item.
sap.m.ViewSettingsItem[]mParameters.filterItems?The selected filters in an array of ViewSettingsItem.
objectmParameters.filterKeys?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.
objectmParameters.filterCompoundKeys?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.
stringmParameters.filterString?The selected filter items in a string format to display in the control's header bar in format "Filtered by: key (subkey1, subkey2, subkey3)".
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
fireFilterDetailPageOpened(mParameters?): sap.m.ViewSettingsDialog
Fires event filterDetailPageOpened to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.m.ViewSettingsFilterItemmParameters.parentFilterItem?The filter item for which the details are opened.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
fireResetFilters(mParameters?): sap.m.ViewSettingsDialog
Fires event resetFilters to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
getCustomTabs(): sap.m.ViewSettingsCustomTab[]

Gets content of aggregation customTabs.

The list of all the custom tabs.

Returns:
sap.m.ViewSettingsCustomTab[]
Since:
1.30
getFilterItems(): sap.m.ViewSettingsItem[]

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.

Returns:
sap.m.ViewSettingsItem[]
Since:
1.16
getFilterSearchOperator(): sap.m.StringFilterOperator

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.

Returns:
sap.m.StringFilterOperatorValue of property filterSearchOperator
Since:
1.42
getGroupDescending(): boolean

Gets current value of property groupDescending.

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

Default value is false.

Returns:
booleanValue of property groupDescending
getGroupItems(): sap.m.ViewSettingsItem[]

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

Returns:
sap.m.ViewSettingsItem[]
Since:
1.16
getPresetFilterItems(): sap.m.ViewSettingsItem[]

Gets content of aggregation presetFilterItems.

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

Returns:
sap.m.ViewSettingsItem[]
Since:
1.16
getSelectedFilterCompoundKeys(): object
Gets the selected filter object in format { parent_key: { key: boolean, key2: boolean, ...}, ... }.
Returns:
objectAn object with item and sub-item keys
Since:
1.42
getSelectedFilterItems(): sap.m.ViewSettingsItem[]

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.

Returns:
sap.m.ViewSettingsItem[]An array of selected filter items
getSelectedFilterString(): string
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.
Returns:
stringThe selected filter string
getSelectedGroupItem(): sap.ui.core.ID
ID of the element which is the current target of the association selectedGroupItem, or null.
Returns:
sap.ui.core.ID
getSelectedPresetFilterItem(): sap.ui.core.ID
ID of the element which is the current target of the association selectedPresetFilterItem, or null.
Returns:
sap.ui.core.ID
getSelectedSortItem(): sap.ui.core.ID
ID of the element which is the current target of the association selectedSortItem, or null.
Returns:
sap.ui.core.ID
getSortDescending(): boolean

Gets current value of property sortDescending.

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

Default value is false.

Returns:
booleanValue of property sortDescending
getSortItems(): sap.m.ViewSettingsItem[]

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

Returns:
sap.m.ViewSettingsItem[]
Since:
1.16
getTitle(): string

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.

Returns:
stringValue of property title
indexOfCustomTab(oCustomTab): int
Checks for the provided sap.m.ViewSettingsCustomTab in the aggregation customTabs. and returns its index if found or -1 otherwise.
Parameters:
sap.m.ViewSettingsCustomTaboCustomTabThe customTab whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.30
indexOfFilterItem(oFilterItem): int
Checks for the provided sap.m.ViewSettingsItem in the aggregation filterItems. and returns its index if found or -1 otherwise.
Parameters:
sap.m.ViewSettingsItemoFilterItemThe filterItem whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.16
indexOfGroupItem(oGroupItem): int
Checks for the provided sap.m.ViewSettingsItem in the aggregation groupItems. and returns its index if found or -1 otherwise.
Parameters:
sap.m.ViewSettingsItemoGroupItemThe groupItem whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.16
indexOfPresetFilterItem(oPresetFilterItem): int
Checks for the provided sap.m.ViewSettingsItem in the aggregation presetFilterItems. and returns its index if found or -1 otherwise.
Parameters:
sap.m.ViewSettingsItemoPresetFilterItemThe presetFilterItem whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.16
indexOfSortItem(oSortItem): int
Checks for the provided sap.m.ViewSettingsItem in the aggregation sortItems. and returns its index if found or -1 otherwise.
Parameters:
sap.m.ViewSettingsItemoSortItemThe sortItem whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
Since:
1.16
insertCustomTab(oCustomTab, iIndex): sap.m.ViewSettingsDialog
Inserts a customTab into the aggregation customTabs.
Parameters:
sap.m.ViewSettingsCustomTaboCustomTabthe customTab to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.30
insertFilterItem(oFilterItem, iIndex): sap.m.ViewSettingsDialog
Inserts a filterItem into the aggregation filterItems.
Parameters:
sap.m.ViewSettingsItemoFilterItemthe filterItem to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
insertGroupItem(oGroupItem, iIndex): sap.m.ViewSettingsDialog
Inserts a groupItem into the aggregation groupItems.
Parameters:
sap.m.ViewSettingsItemoGroupItemthe groupItem to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
insertPresetFilterItem(oPresetFilterItem, iIndex): sap.m.ViewSettingsDialog
Inserts a presetFilterItem into the aggregation presetFilterItems.
Parameters:
sap.m.ViewSettingsItemoPresetFilterItemthe presetFilterItem to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
insertSortItem(oSortItem, iIndex): sap.m.ViewSettingsDialog
Inserts a sortItem into the aggregation sortItems.
Parameters:
sap.m.ViewSettingsItemoSortItemthe sortItem to insert; if empty, nothing is inserted
intiIndexthe 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
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
open(sPageId?): sap.m.ViewSettingsDialog
Opens the ViewSettingsDialog relative to the parent control.
Parameters:
stringsPageId?The ID of the initial page to be opened in the dialog. The available values are "sort", "group", "filter" or IDs of custom tabs.
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
removeAllCustomTabs(): sap.m.ViewSettingsCustomTab[]

Removes all the controls from the aggregation customTabs.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.ViewSettingsCustomTab[]An array of the removed elements (might be empty)
Since:
1.30
removeAllFilterItems(): sap.m.ViewSettingsDialog
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.
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
removeAllGroupItems(): sap.m.ViewSettingsItem[]

Removes all the controls from the aggregation groupItems.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.ViewSettingsItem[]An array of the removed elements (might be empty)
Since:
1.16
removeAllPresetFilterItems(): sap.m.ViewSettingsItem[]

Removes all the controls from the aggregation presetFilterItems.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.ViewSettingsItem[]An array of the removed elements (might be empty)
Since:
1.16
removeAllSortItems(): sap.m.ViewSettingsItem[]

Removes all the controls from the aggregation sortItems.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.m.ViewSettingsItem[]An array of the removed elements (might be empty)
Since:
1.16
removeCustomTab(vCustomTab): sap.m.ViewSettingsCustomTab
Removes a customTab from the aggregation customTabs.
Parameters:
int|string|sap.m.ViewSettingsCustomTabvCustomTabThe customTab to remove or its index or id
Returns:
sap.m.ViewSettingsCustomTabThe removed customTab or null
Since:
1.30
removeFilterItem(vFilterItem): sap.m.ViewSettingsDialog
Removes a filter Item and resets the remembered page if it was the filter detail page of the removed filter.
Parameters:
int|sap.m.ViewSettingsFilterItem|stringvFilterItemThe filter item's index, or the item itself, or its id
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
removeGroupItem(vGroupItem): sap.m.ViewSettingsItem
Removes a groupItem from the aggregation groupItems.
Parameters:
int|string|sap.m.ViewSettingsItemvGroupItemThe groupItem to remove or its index or id
Returns:
sap.m.ViewSettingsItemThe removed groupItem or null
Since:
1.16
removePresetFilterItem(vPresetFilterItem): sap.m.ViewSettingsItem
Removes a presetFilterItem from the aggregation presetFilterItems.
Parameters:
int|string|sap.m.ViewSettingsItemvPresetFilterItemThe presetFilterItem to remove or its index or id
Returns:
sap.m.ViewSettingsItemThe removed presetFilterItem or null
Since:
1.16
removeSortItem(vSortItem): sap.m.ViewSettingsItem
Removes a sortItem from the aggregation sortItems.
Parameters:
int|string|sap.m.ViewSettingsItemvSortItemThe sortItem to remove or its index or id
Returns:
sap.m.ViewSettingsItemThe removed sortItem or null
Since:
1.16
setBusy(bBusy): sap.m.ViewSettingsDialog
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
Parameters:
booleanbBusyThe busy state flag
Returns:
sap.m.ViewSettingsDialogthis Instance for chaining
setFilterSearchCallback(fnTest): sap.m.ViewSettingsDialog
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.
Parameters:
functionfnTestA function that accepts two parameters fnTest({string} query, {string} value) and returns boolean if the value satisfies the query.
Returns:
sap.m.ViewSettingsDialogthis instance for chaining
Since:
1.42
setFilterSearchOperator(sFilterSearchOperator): sap.m.ViewSettingsDialog

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.

Parameters:
sap.m.StringFilterOperatorsFilterSearchOperatorNew value for property filterSearchOperator
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.42
setGroupDescending(bGroupDescending): sap.m.ViewSettingsDialog

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.

Parameters:
booleanbGroupDescendingNew value for property groupDescending
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
setSelectedFilterCompoundKeys(oSelectedFilterKeys): sap.m.ViewSettingsDialog
Sets the selected filter object in format { parent_key: { key: boolean, key2: boolean, ...}, ... }.
Parameters:
objectoSelectedFilterKeysA 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.
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
Since:
1.42
setSelectedGroupItem(vItemOrKey): sap.m.ViewSettingsDialog
Sets the selected group item (either by key or by item).
Parameters:
sap.m.ViewSettingsItem|stringvItemOrKeyThe selected item or the item's key string
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
setSelectedPresetFilterItem(vItemOrKey): sap.m.ViewSettingsDialog
Sets the selected preset filter item.
Parameters:
sap.m.ViewSettingsItem|stringvItemOrKeyThe selected item or the item's key string
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
setSelectedSortItem(vItemOrKey): sap.m.ViewSettingsDialog
Sets the selected sort item (either by key or by item).
Parameters:
sap.m.ViewSettingsItem|stringvItemOrKeyThe selected item or the item's key string
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
setSortDescending(bSortDescending): sap.m.ViewSettingsDialog

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.

Parameters:
booleanbSortDescendingNew value for property sortDescending
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
setTitle(sTitle): sap.m.ViewSettingsDialog
Sets the title of the internal dialog.
Parameters:
stringsTitleThe title text for the dialog
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
unbindCustomTabs(): sap.m.ViewSettingsDialog
Unbinds aggregation customTabs from model data.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.30
unbindFilterItems(): sap.m.ViewSettingsDialog
Unbinds aggregation filterItems from model data.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
unbindGroupItems(): sap.m.ViewSettingsDialog
Unbinds aggregation groupItems from model data.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
unbindPresetFilterItems(): sap.m.ViewSettingsDialog
Unbinds aggregation presetFilterItems from model data.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
unbindSortItems(): sap.m.ViewSettingsDialog
Unbinds aggregation sortItems from model data.
Returns:
sap.m.ViewSettingsDialogReference to this in order to allow method chaining
Since:
1.16
getSelectedFilterKeys(): object

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.

Returns:
objectAn object with item and sub-item keys
Deprecated API:
As of version 1.42, replaced by getSelectedFilterCompoundKeys
setSelectedFilterKeys(oSelectedFilterKeys): sap.m.ViewSettingsDialog
Sets the selected filter object in format {key: boolean}. Note: Do not use duplicated item keys with this method.
Parameters:
objectoSelectedFilterKeysA 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.
Returns:
sap.m.ViewSettingsDialogthis pointer for chaining
Deprecated API:
As of version 1.42, replaced by setSelectedFilterCompoundKeys