class sap.ui.comp.filterbar.FilterBar

Visiblity: public
UX Guidelines: Filter Bar
Implements:
Available since: N/A
Module: sap/ui/comp/filterbar/FilterBar
Application Component: CA-UI5-CMP

The control displays filters in a user-friendly manner to populate values for a query. The FilterBar consists of a row containing the VariantManagement control, the related buttons, and an area underneath displaying the filters. The filters are arranged in a logical row that is divided depending on the space available and the width of the filters. The area containing the filters can be hidden or shown using the Hide FilterBar / Show FilterBar button. The Go button triggers the search event, and the Filters button shows the filter dialog.
In this dialog, the consumer has full control over the FilterBar. The filters in this dialog are displayed in one column and organized in groups. The filter items of the filterItems aggregation are grouped in the Basic group . Each filter can be marked as visible in the FilterBar by selecting Add to FilterBar. In addition, the items in the filterGroupItems aggregation can be marked as part of the current variant. The FilterBar also supports a different UI layout when used inside a value help dialog. In this case, the FilterBar consists of two logical areas, one containing the search field with Go button and one - the advanced area. The filters are aligned in a grid with labels above each. The number of items per row depends on the width of the value help dialog. By default, the filter bar will show up to 8 filters. If there are more than 8 filters, a new button 'Show All Filters' appears in the place of the 8th filter. Clicking on this button displays all filters.


Constructor

Constructor for a new FilterBar.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.

new sap.ui.comp.filterbar.FilterBar(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
advancedMode boolean false

The advanced mode is only relevant for the value help scenario. UI representation is different from the standard FilterBar.

Visibility: public
considerGroupTitle boolean false

If this property is set, then the label for filters will be prefixed with the group title.

Since: 1.28.0.

Visibility: public
deltaVariantMode boolean true

Stores the delta as compared to the standard variant.

Since: 1.34.0.

Visibility: public
expandAdvancedArea boolean false

Collapses/expands the advanced area.

Visibility: public
filterBarExpanded boolean true

Shows the filters area. When property useToolbar is set to false, filterBarExpanded is set to true automatically. Note: When SmartFilterBar is used inside a ValueHelpDialog, it is initially collapsed. The filter bar is initially expanded in the following cases:

- When there is no basic search field. - When preventInitialDataFetchInValueHelpDialog is set to true or the fetchValues property of the valueList annotation is set to 2. - When there are mandatory fields, all fields are expanded (not only the first 7).

Since: 1.26.1.

Visibility: public
filterContainerWidth string 12rem

Sets the width of the filters container.

Since: 1.34.0.

Visibility: public
header string empty string

Specifies header text that is shown in the toolbar on the first position. This property is ignored, when useToolbar is set to false.

Since: 1.38.0.

Visibility: public
isRunningInValueHelpDialog boolean false

Sets whether the filter bar should look like the filters area in a ValueHelpDialog. True for SmartFilterBar when used in a ValueHelpDialog. False otherwise.

Visibility: public
persistencyKey string empty string

Key used to access personalization data. Only if the persistencyKey is provided, will the VariantManagement control be used.

Visibility: public
searchEnabled boolean true

Enables/disables the Search button.

Visibility: public
showClearButton boolean false

Handles visibility of the Clear button on the Filters dialog.

Visibility: public
showClearOnFB boolean false

Handles visibility of the Clear button on the FilterBar.

Since: 1.28.0.

Visibility: public
showFilterConfiguration boolean true

Handles visibility of the Filters button on the FilterBar.

Since: 1.38.0.

Visibility: public
showGoButton boolean

Handles visibility of the Go button on the FilterBar.

Since: 1.26.1.

Visibility: public
showGoOnFB boolean true

Handles visibility of the Go button on the FilterBar.

Since: 1.28.0.

Visibility: public
showRestoreButton boolean true

Handles visibility of the "Restore" button on the "Filters" dialog. Note: Restore works only automatically when a property persistencyKey is set and therefore Variant Management is used. In all other cases the "restore" behavior needs to be implemented by the app, based on the event reset. Since 1.84 the "Restore" button text is changed to "Reset"

Since: 1.26.1.

Visibility: public
showRestoreOnFB boolean false

Handles visibility of the Restore button on the FilterBar.

Since: 1.28.0.

Visibility: public
useSnapshot boolean

Determines the behavior when reset is executed.
Note: This property is only relevant if no variant management is used, and the filter bar is not used in the advanced mode. A snapshot shows the current state of the filter bar, just before the Filters dialog is opened.

  • undefined (default) defines the standard behavior: snapshot will be applied after reset was triggered
  • false defines that the snapshot will not be applied
  • trueis not considered at all


Since: 1.44.

Visibility: public
useToolbar boolean true

Determines what design is used. Default is the design with toolbar. If the property useToolbar is set to false, the property filterBarExpanded is set to true automatically. Note:
If set to false, the VariantManagement control is not available at all. This scenario is only intended for the sap.ui.comp.smartfilterbar.SmartFilterBar.

Since: 1.38.0.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_parameters 0..n sap.ui.comp.filterbar.FilterGroupItem

Special handling for analytic parameters.

filterGroupItems 0..n sap.ui.comp.filterbar.FilterGroupItem

Contains all FilterBar filters.
Note:In case a filter has to be added to the basic group

  • the property groupName has to be set to the constant sap.ui.comp.filterbar.FilterBar.INTERNAL_GROUP
  • the property groupLabel will be handled internally and will be ignored, if set
  • the property partOfCurrentVariant has to be set to true
  • if the property visibleInFilterBar is set to true, the property partOfCurrentVariant will be set internally also to true

filterItems 0..n sap.ui.comp.filterbar.FilterItem

Filters belonging to the basic group.
Deprecated as of version 1.48.0. Use aggregation filterGroupItems instead.


Associations

Name Cardinality Type Description
basicSearch 0..1 sap.m.SearchField

Populates the basic search area on the FilterBar and the Filters dialog.

Since: 1.30.0.


Events Overview

Event Description
afterVariantLoad

This event is fired after a variant has been loaded and applied to the FilterBar. The event can be used to adapt custom filters with data from the variant.

afterVariantSave

This event is fired after a variant has been saved.

assignedFiltersChanged

This event is fired when the filters information has changed. It indicates specifically that the count of assigned filters may be changed. One of the intended reaction to this event would be to call retrieveFiltersWithValuesAsText method.

Since: 1.38.0.

beforeVariantFetch

This event is fired before a variant is fetched.

Since: 1.28.13.

beforeVariantSave

This event is fired before a variant is saved. The event can be used to adapt the data of the custom filters, which will be saved as variant later.

cancel

This event is fired when the Cancel button on the Filters dialog is pressed and the variant is marked as dirty.

clear

This event is fired when the Clear button is pressed. The consumer has to clear all filters.

filterChange

This event is fired when a filter or multiple filters has changed.

filtersDialogBeforeOpen

This event is fired after the filters dialog is opened.

Since: 1.48.0.

filtersDialogCancel

This event is fired when the Cancel button on the filters dialog is pressed.

Since: 1.48.0.

filtersDialogClosed

This event is fired after the filters dialog is closed.

Since: 1.34.0.

filtersDialogSearch

This event is fired when the Go button on the filters dialog is pressed.

Since: 1.48.0.

filtersDialogSearchForFilters

This event is fired when search field of the filter dialog is changed.

Since: 1.48.0.

initialise

This event is fired when the FilterBar is initialized to indicate that metadata are available.

initialized

This event is fired after the FilterBar has been initialized, the user's default variant has been applied, and a stable filter state has been achieved. With this event all relevant filter information, for example, for navigation-related actions, is available via sap.ui.comp.filterbar.FilterBar#getUiState.

Since: 1.38.0.

reset

This event is fired when the Restore button is pressed.

search

This event is fired when the Go button is pressed.

afterVariantLoad

This event is fired after a variant has been loaded and applied to the FilterBar. The event can be used to adapt custom filters with data from the variant.

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

Context of the event. Can also be null or undefined

executeOnSelect boolean

executeOnSelect indicates if the variant will trigger search

Since: 1.44.0.

afterVariantSave

This event is fired after a variant has been saved.

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

assignedFiltersChanged

This event is fired when the filters information has changed. It indicates specifically that the count of assigned filters may be changed. One of the intended reaction to this event would be to call retrieveFiltersWithValuesAsText method.

Since: 1.38.0.

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

beforeVariantFetch

This event is fired before a variant is fetched.

Since: 1.28.13.

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

beforeVariantSave

This event is fired before a variant is saved. The event can be used to adapt the data of the custom filters, which will be saved as variant later.

Replaced by the event <code>beforeVariantFetch</code>
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
context string

Context of the event. Can also be null or undefined

cancel

This event is fired when the Cancel button on the Filters dialog is pressed and the variant is marked as dirty.

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

clear

This event is fired when the Clear button is pressed. The consumer has to clear all filters.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
selectionSet sap.ui.core.Control[]

Visible controls

filterChange

This event is fired when a filter or multiple filters has changed.

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

filtersDialogBeforeOpen

This event is fired after the filters dialog is opened.

Since: 1.48.0.

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

filtersDialogCancel

This event is fired when the Cancel button on the filters dialog is pressed.

Since: 1.48.0.

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

filtersDialogClosed

This event is fired after the filters dialog is closed.

Since: 1.34.0.

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

Context of the event. Can also be null or undefined

filtersDialogSearch

This event is fired when the Go button on the filters dialog is pressed.

Since: 1.48.0.

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

filtersDialogSearchForFilters

This event is fired when search field of the filter dialog is changed.

Since: 1.48.0.

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

Contains the entered search filed value

initialise

This event is fired when the FilterBar is initialized to indicate that metadata are available.

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

initialized

This event is fired after the FilterBar has been initialized, the user's default variant has been applied, and a stable filter state has been achieved. With this event all relevant filter information, for example, for navigation-related actions, is available via sap.ui.comp.filterbar.FilterBar#getUiState.

Since: 1.38.0.

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

reset

This event is fired when the Restore button is pressed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
selectionSet sap.ui.core.Control[]

Visible controls

search

This event is fired when the Go button is pressed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
selectionSet sap.ui.core.Control[]

Visible controls


Methods Overview

Method Description
_addParameter

Adds a FilterGroupItem element to the aggregation _parameters.

_isPhone

Checks if running on phone.

_isTablet

Checks if running on tablet.

_retrieveCurrentSelectionSet

Retrieves the controls for all visible filters.

_updateToolbarText

Updates the 'Filters'-button text with the count of filters with values

addAdaptFilterDialogCustomContent

Enables to add application specific content as a custom view to the new adapt filters dialog.

addFilterDialogContent

Enables to add application specific content to the filters dialog. If the content was not yet added it will be added. The content will be set to visible, all other filters dialog content will be set to invisible. Not implemented yet for the new Adapt Filters Dialog

addFilterGroupItem

Adds some filterGroupItem to the aggregation filterGroupItems.

addFilterItem

Adds some filterItem to the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
applyVariant

Applies the variant.

attachAfterVariantLoad

Attaches event handler fnFunction to the afterVariantLoad event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after a variant has been loaded and applied to the FilterBar. The event can be used to adapt custom filters with data from the variant.

attachAfterVariantSave

Attaches event handler fnFunction to the afterVariantSave event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after a variant has been saved.

attachAssignedFiltersChanged

Attaches event handler fnFunction to the assignedFiltersChanged event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the filters information has changed. It indicates specifically that the count of assigned filters may be changed. One of the intended reaction to this event would be to call retrieveFiltersWithValuesAsText method.

attachBeforeVariantFetch

Attaches event handler fnFunction to the beforeVariantFetch event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired before a variant is fetched.

attachBeforeVariantSave

Attaches event handler fnFunction to the beforeVariantSave event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired before a variant is saved. The event can be used to adapt the data of the custom filters, which will be saved as variant later.

Since 1.48.2 Replaced by the event <code>beforeVariantFetch</code>
attachCancel

Attaches event handler fnFunction to the cancel event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Cancel button on the Filters dialog is pressed and the variant is marked as dirty.

attachClear

Attaches event handler fnFunction to the clear event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Clear button is pressed. The consumer has to clear all filters.

attachFilterChange

Attaches event handler fnFunction to the filterChange event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when a filter or multiple filters has changed.

attachFiltersDialogBeforeOpen

Attaches event handler fnFunction to the filtersDialogBeforeOpen event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after the filters dialog is opened.

attachFiltersDialogCancel

Attaches event handler fnFunction to the filtersDialogCancel event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Cancel button on the filters dialog is pressed.

attachFiltersDialogClosed

Attaches event handler fnFunction to the filtersDialogClosed event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after the filters dialog is closed.

attachFiltersDialogSearch

Attaches event handler fnFunction to the filtersDialogSearch event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Go button on the filters dialog is pressed.

attachFiltersDialogSearchForFilters

Attaches event handler fnFunction to the filtersDialogSearchForFilters event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when search field of the filter dialog is changed.

attachInitialise

Attaches event handler fnFunction to the initialise event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the FilterBar is initialized to indicate that metadata are available.

attachInitialized

Attaches event handler fnFunction to the initialized event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after the FilterBar has been initialized, the user's default variant has been applied, and a stable filter state has been achieved. With this event all relevant filter information, for example, for navigation-related actions, is available via sap.ui.comp.filterbar.FilterBar#getUiState.

attachReset

Attaches event handler fnFunction to the reset event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Restore button is pressed.

attachSearch

Attaches event handler fnFunction to the search event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Go button is pressed.

clearVariantSelection

Resets the current selection in the variant management control to standard.

destroyFilterGroupItems

Destroys all the filterGroupItems in the aggregation filterGroupItems.

destroyFilterItems

Destroys all the filterItems in the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
detachAfterVariantLoad

Detaches event handler fnFunction from the afterVariantLoad event of this sap.ui.comp.filterbar.FilterBar.

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

detachAfterVariantSave

Detaches event handler fnFunction from the afterVariantSave event of this sap.ui.comp.filterbar.FilterBar.

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

detachAssignedFiltersChanged

Detaches event handler fnFunction from the assignedFiltersChanged event of this sap.ui.comp.filterbar.FilterBar.

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

detachBeforeVariantFetch

Detaches event handler fnFunction from the beforeVariantFetch event of this sap.ui.comp.filterbar.FilterBar.

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

detachBeforeVariantSave

Detaches event handler fnFunction from the beforeVariantSave event of this sap.ui.comp.filterbar.FilterBar.

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

Since 1.48.2 Replaced by the event <code>beforeVariantFetch</code>
detachCancel

Detaches event handler fnFunction from the cancel event of this sap.ui.comp.filterbar.FilterBar.

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

detachClear

Detaches event handler fnFunction from the clear event of this sap.ui.comp.filterbar.FilterBar.

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

detachFilterChange

Detaches event handler fnFunction from the filterChange event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogBeforeOpen

Detaches event handler fnFunction from the filtersDialogBeforeOpen event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogCancel

Detaches event handler fnFunction from the filtersDialogCancel event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogClosed

Detaches event handler fnFunction from the filtersDialogClosed event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogSearch

Detaches event handler fnFunction from the filtersDialogSearch event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogSearchForFilters

Detaches event handler fnFunction from the filtersDialogSearchForFilters event of this sap.ui.comp.filterbar.FilterBar.

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

detachInitialise

Detaches event handler fnFunction from the initialise event of this sap.ui.comp.filterbar.FilterBar.

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

detachInitialized

Detaches event handler fnFunction from the initialized event of this sap.ui.comp.filterbar.FilterBar.

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.ui.comp.filterbar.FilterBar.

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

detachSearch

Detaches event handler fnFunction from the search event of this sap.ui.comp.filterbar.FilterBar.

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

determineControlByFilterItem

Retrieves the control associated to the filter.

determineControlByName

Retrieves the control based on the name and group name.

determineFilterItemByName

Retrieves the filter corresponding to the filter name.

determineLabelByName

Retrieves the associated label based on the name and group name.

determineMandatoryFilterItems

Retrieves the mandatory filters.

sap.ui.comp.filterbar.FilterBar.extend

Creates a new subclass of class sap.ui.comp.filterbar.FilterBar 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.layout.Grid.extend.

fetchVariant

Creates and returns the variant representation.

fireAfterVariantSave

Fires event afterVariantSave to attached listeners.

fireAssignedFiltersChanged

Fires event assignedFiltersChanged to attached listeners.

fireBeforeVariantFetch

Fires event beforeVariantFetch to attached listeners.

fireCancel

Fires event cancel to attached listeners.

fireClear

Fires event clear to attached listeners.

fireFiltersDialogBeforeOpen

Fires event filtersDialogBeforeOpen to attached listeners.

fireFiltersDialogCancel

Fires event filtersDialogCancel to attached listeners.

fireFiltersDialogClosed

Fires event filtersDialogClosed to attached listeners.

fireFiltersDialogSearch

Fires event filtersDialogSearch to attached listeners.

fireFiltersDialogSearchForFilters

Fires event filtersDialogSearchForFilters to attached listeners.

fireInitialise

Fires event initialise to attached listeners.

fireInitialized

Fires event initialized to attached listeners.

fireReset

Fires event reset to attached listeners.

fireSearch

Fires event search to attached listeners.

getAdvancedMode

Gets current value of property advancedMode.

The advanced mode is only relevant for the value help scenario. UI representation is different from the standard FilterBar.

Default value is false.

getAllFilterItems

Retrieves filters belonging to the current variant.

getBasicSearch

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

getBasicSearchName

Determine the internal basic search field name.

getBasicSearchValue

Determine the value of the basic search.

getConsiderGroupTitle

Gets current value of property considerGroupTitle.

If this property is set, then the label for filters will be prefixed with the group title.

Default value is false.

getCurrentVariantId

Retrieves the current variant ID.

getDataSuiteFormat

Retrieves the current variant as selection variant for UI navigation

Since 1.48 replaced by {@link sap.ui.comp.filterbar.FilterBar#getUiState}
getDeltaVariantMode

Gets current value of property deltaVariantMode.

Stores the delta as compared to the standard variant.

Default value is true.

getDescriptionForKeys

Reads the descriptions for given filters and value keys.

getFilterBarExpanded

Gets current value of property filterBarExpanded.

Shows the filters area. When property useToolbar is set to false, filterBarExpanded is set to true automatically. Note: When SmartFilterBar is used inside a ValueHelpDialog, it is initially collapsed. The filter bar is initially expanded in the following cases:

- When there is no basic search field. - When preventInitialDataFetchInValueHelpDialog is set to true or the fetchValues property of the valueList annotation is set to 2. - When there are mandatory fields, all fields are expanded (not only the first 7).

Default value is true.

getFilterContainerWidth

Gets current value of property filterContainerWidth.

Sets the width of the filters container.

Default value is "12rem".

getFilterDialogContent

Returns the filter dialog content. Node:The original content is a Form. The form may be enhanced with a toolbar to enable the inner switch to an added custom content. Besides such operations, the original content should not be manipulated in any way.

getFilterGroupItems

Gets content of aggregation filterGroupItems.

Contains all FilterBar filters.
Note:In case a filter has to be added to the basic group

  • the property groupName has to be set to the constant sap.ui.comp.filterbar.FilterBar.INTERNAL_GROUP
  • the property groupLabel will be handled internally and will be ignored, if set
  • the property partOfCurrentVariant has to be set to true
  • if the property visibleInFilterBar is set to true, the property partOfCurrentVariant will be set internally also to true

getFilterItems

Gets content of aggregation filterItems.

Filters belonging to the basic group.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
getHeader

Gets current value of property header.

Specifies header text that is shown in the toolbar on the first position. This property is ignored, when useToolbar is set to false.

Default value is empty string.

getInitializedPromise

Returns promise which will be resolve when the initialized event is fired.

getIsRunningInValueHelpDialog

Gets current value of property isRunningInValueHelpDialog.

Sets whether the filter bar should look like the filters area in a ValueHelpDialog. True for SmartFilterBar when used in a ValueHelpDialog. False otherwise.

Default value is false.

sap.ui.comp.filterbar.FilterBar.getMetadata

Returns a metadata object for class sap.ui.comp.filterbar.FilterBar.

getPersistencyKey

Gets current value of property persistencyKey.

Key used to access personalization data. Only if the persistencyKey is provided, will the VariantManagement control be used.

Default value is empty string.

getSearchEnabled

Gets current value of property searchEnabled.

Enables/disables the Search button.

Default value is true.

getShowClearButton

Gets current value of property showClearButton.

Handles visibility of the Clear button on the Filters dialog.

Default value is false.

getShowClearOnFB

Gets current value of property showClearOnFB.

Handles visibility of the Clear button on the FilterBar.

Default value is false.

getShowFilterConfiguration

Gets current value of property showFilterConfiguration.

Handles visibility of the Filters button on the FilterBar.

Default value is true.

getShowGoButton

Gets current value of property showGoButton.

Handles visibility of the Go button on the FilterBar.

Since 1.28.0 Replaced by property <code>showGoOnFB</code>
getShowGoOnFB

Gets current value of property showGoOnFB.

Handles visibility of the Go button on the FilterBar.

Default value is true.

getShowRestoreButton

Gets current value of property showRestoreButton.

Handles visibility of the "Restore" button on the "Filters" dialog. Note: Restore works only automatically when a property persistencyKey is set and therefore Variant Management is used. In all other cases the "restore" behavior needs to be implemented by the app, based on the event reset. Since 1.84 the "Restore" button text is changed to "Reset"

Default value is true.

getShowRestoreOnFB

Gets current value of property showRestoreOnFB.

Handles visibility of the Restore button on the FilterBar.

Default value is false.

getUiState

Retrieves the current UI state of the FilterBar control.
The current UI state represents the data suite format.

getUseSnapshot

Gets current value of property useSnapshot.

Determines the behavior when reset is executed.
Note: This property is only relevant if no variant management is used, and the filter bar is not used in the advanced mode. A snapshot shows the current state of the filter bar, just before the Filters dialog is opened.

  • undefined (default) defines the standard behavior: snapshot will be applied after reset was triggered
  • false defines that the snapshot will not be applied
  • trueis not considered at all

getUseToolbar

Gets current value of property useToolbar.

Determines what design is used. Default is the design with toolbar. If the property useToolbar is set to false, the property filterBarExpanded is set to true automatically. Note:
If set to false, the VariantManagement control is not available at all. This scenario is only intended for the sap.ui.comp.smartfilterbar.SmartFilterBar.

Default value is true.

getVariantManagement

Returns the associated VariantManagement control. The returned VariantManagement instance should not be cached or manipulated in any ways. It should offer the application a convenient way to verify the dirty state and to check for page variant scenario. The method may return null or a disabled VariantManagement control.

hideGoButton

Hides the Go button on FilterBar. Allows to hide the Go-button for dedicated scenarios, like liveMode.

indexOfFilterGroupItem

Checks for the provided sap.ui.comp.filterbar.FilterGroupItem in the aggregation filterGroupItems. and returns its index if found or -1 otherwise.

indexOfFilterItem

Checks for the provided sap.ui.comp.filterbar.FilterItem in the aggregation filterItems. and returns its index if found or -1 otherwise.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
isCurrentVariantExecuteOnSelectEnabled

Returns the information whether the flag 'executeOnSelect' is set or not on current variant.

isCurrentVariantStandard

Determines if the current variant is the standard variant

isDialogOpen

Determines if the filters dialog is opened.

registerApplyData

Registration of a callback function. The provided callback function is executed when a variant must be applied. The callback function will receive the corresponding data set containing all relevant data in JSON, as initially provided by the callback for fetchData.

registerFetchData

Registration of a callback function. The provided callback function is executed when saving a variant is triggered and must provide all relevant fields and values in JSON.

registerGetFiltersWithValues

Registration of a callback function. The provided callback function is executed to obtain the filters with values.

removeAllFilterGroupItems

Removes all entries in the aggregation filterGroupItems.

removeAllFilterItems

Removes all entries in the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
removeAllFilters

Removes all entries in the aggregations filterItems, filterGroupItems, basicSearch

removeFilterGroupItem

Removes a filterGroupItem from the aggregation filterGroupItems.

removeFilterItem

Removes a filterItem from the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
rerenderFilters

Adapts the visibility for all filter containers.

restoreGoButton

Restores the visibility of the Go button on FilterBar. The visibility of the Go button will be set, according to the showGoOnFB property.

retrieveFiltersWithValues

Retrieves the labels of all visible filters that belongs to the current variant and have an assigned value.

retrieveFiltersWithValuesAsText

Returns a summary string that contains information about the filters currently assigned. The string starts with "Filtered By", followed by the number of set filters and their labels.
Example:
Filtered By (3): Company Code, Fiscal Year, Customer

search

Executes the search event. Controls of all visible filters will be passed as event-parameters.

setAdvancedMode

Sets a new value for property advancedMode.

The advanced mode is only relevant for the value help scenario. UI representation is different from the standard FilterBar.

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

Default value is false.

setBasicSearch

Sets the associated basicSearch.

setConsiderGroupTitle

Sets a new value for property considerGroupTitle.

If this property is set, then the label for filters will be prefixed with the group title.

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

Default value is false.

setContentHeight

Sets the height of the content area of the dialog. The passed dimension will be interpreted as 'px'.

setContentWidth

Sets the width of the content area of the dialog. The passed dimension will be interpreted as 'px'.

setCurrentVariantId

Sets the current variant ID.

setDataSuiteFormat

Sets the selection variant for UI navigation to FilterBar.

Since 1.48 replaced by {@link sap.ui.comp.filterbar.FilterBar#setUiState}
setDeltaVariantMode

Sets a new value for property deltaVariantMode.

Stores the delta as compared to the standard variant.

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

Default value is true.

setFilterBarExpanded

Sets a new value for property filterBarExpanded.

Shows the filters area. When property useToolbar is set to false, filterBarExpanded is set to true automatically. Note: When SmartFilterBar is used inside a ValueHelpDialog, it is initially collapsed. The filter bar is initially expanded in the following cases:

- When there is no basic search field. - When preventInitialDataFetchInValueHelpDialog is set to true or the fetchValues property of the valueList annotation is set to 2. - When there are mandatory fields, all fields are expanded (not only the first 7).

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

Default value is true.

setFilterContainerWidth

Sets a new value for property filterContainerWidth.

Sets the width of the filters container.

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

Default value is "12rem".

setHeader

Sets a new value for property header.

Specifies header text that is shown in the toolbar on the first position. This property is ignored, when useToolbar is set to false.

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

Default value is empty string.

setIsRunningInValueHelpDialog

Sets a new value for property isRunningInValueHelpDialog.

Sets whether the filter bar should look like the filters area in a ValueHelpDialog. True for SmartFilterBar when used in a ValueHelpDialog. False otherwise.

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

Default value is false.

setPersistencyKey

Sets a new value for property persistencyKey.

Key used to access personalization data. Only if the persistencyKey is provided, will the VariantManagement control be used.

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

Default value is empty string.

setSearchEnabled

Sets a new value for property searchEnabled.

Enables/disables the Search button.

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

Default value is true.

setShowClearButton

Sets a new value for property showClearButton.

Handles visibility of the Clear button on the Filters dialog.

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

Default value is false.

setShowClearOnFB

Sets a new value for property showClearOnFB.

Handles visibility of the Clear button on the FilterBar.

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

Default value is false.

setShowFilterConfiguration

Sets a new value for property showFilterConfiguration.

Handles visibility of the Filters button on the FilterBar.

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

Default value is true.

setShowGoButton

Sets a new value for property showGoButton.

Handles visibility of the Go button on the FilterBar.

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

Since 1.28.0 Replaced by property <code>showGoOnFB</code>
setShowGoOnFB

Sets a new value for property showGoOnFB.

Handles visibility of the Go button on the FilterBar.

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

Default value is true.

setShowOldFilterDialog

Once set, the activation of the 'Adapt Filters' button will open the 'old' filters dialog. This method offers an intermediate solution for the visual filters scenario, which relies on the old filters dialog.

setShowRestoreButton

Sets a new value for property showRestoreButton.

Handles visibility of the "Restore" button on the "Filters" dialog. Note: Restore works only automatically when a property persistencyKey is set and therefore Variant Management is used. In all other cases the "restore" behavior needs to be implemented by the app, based on the event reset. Since 1.84 the "Restore" button text is changed to "Reset"

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

Default value is true.

setShowRestoreOnFB

Sets a new value for property showRestoreOnFB.

Handles visibility of the Restore button on the FilterBar.

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

Default value is false.

setUiState

Sets the current UI state of the FilterBar control.
The current UI state represents the data suite format.

setUiStateAsVariant

Apply the SelectionPresentationVariant annotated information as a variant. The current UI state represents the data suite format.

setUseSnapshot

Sets a new value for property useSnapshot.

Determines the behavior when reset is executed.
Note: This property is only relevant if no variant management is used, and the filter bar is not used in the advanced mode. A snapshot shows the current state of the filter bar, just before the Filters dialog is opened.

  • undefined (default) defines the standard behavior: snapshot will be applied after reset was triggered
  • false defines that the snapshot will not be applied
  • trueis not considered at all

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

setUseToolbar

Sets a new value for property useToolbar.

Determines what design is used. Default is the design with toolbar. If the property useToolbar is set to false, the property filterBarExpanded is set to true automatically. Note:
If set to false, the VariantManagement control is not available at all. This scenario is only intended for the sap.ui.comp.smartfilterbar.SmartFilterBar.

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

Default value is true.

showAdaptFilterDialog

Opens the Adapt Filters Dialog

showAdaptFilterDialogForKeyUser

Opens the Adapt Filters Dialog for the UI adaptation.
Note: This function must only be used internally during the UI adaptation.

showFilterDialog

For backward compatibility. Creates adapt filters dialog

variantsInitialized

This method will be called by the SmartVariantMangement and indicates, that the standard variant was obtained. It indicates, that the variant management is fully initialized.

_addParameter

Adds a FilterGroupItem element to the aggregation _parameters.

Param Type DefaultValue Description
oParameter sap.ui.comp.filterbar.FilterGroupItem

adding a analytical parameter

_isPhone

Checks if running on phone.

_isTablet

Checks if running on tablet.

_retrieveCurrentSelectionSet

Retrieves the controls for all visible filters.

Param Type DefaultValue Description
bWithName boolean

determines the returning structure. Either list of controls, or list of filter name and control.

bConsiderParameters boolean

determines if parameters should be considered.

_updateToolbarText

Updates the 'Filters'-button text with the count of filters with values

addAdaptFilterDialogCustomContent

Enables to add application specific content as a custom view to the new adapt filters dialog.

Param Type DefaultValue Description
mCustomView object

the setting for the custom view

item sap.m.SegmentedButtonItem

the custom button used in the view switch

content sap.ui.core.Control

the content displayed in the custom view

search function

callback triggered by search - executed with the string as parameter

selectionChange function

callback triggered by selecting a view - executed with the key as parameter

addFilterDialogContent

Enables to add application specific content to the filters dialog. If the content was not yet added it will be added. The content will be set to visible, all other filters dialog content will be set to invisible. Not implemented yet for the new Adapt Filters Dialog

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

to be added; if empty, nothing is inserted.

addFilterGroupItem

Adds some filterGroupItem to the aggregation filterGroupItems.

Param Type DefaultValue Description
oFilterGroupItem sap.ui.comp.filterbar.FilterGroupItem

The filterGroupItem to add; if empty, nothing is inserted

addFilterItem

Adds some filterItem to the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
Param Type DefaultValue Description
oFilterItem sap.ui.comp.filterbar.FilterItem

The filterItem to add; if empty, nothing is inserted

applyVariant

Applies the variant.

Param Type DefaultValue Description
oVariant object

JSON object

sContext string

Describes in which context the variant is applied. The context is passed on to the application via the afterVariantLoad event

bInitial boolean

indicates if the apply was executed during the initialization phase.

attachAfterVariantLoad

Attaches event handler fnFunction to the afterVariantLoad event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after a variant has been loaded and applied to the FilterBar. The event can be used to adapt custom filters with data from the variant.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachAfterVariantSave

Attaches event handler fnFunction to the afterVariantSave event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after a variant has been saved.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachAssignedFiltersChanged

Attaches event handler fnFunction to the assignedFiltersChanged event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the filters information has changed. It indicates specifically that the count of assigned filters may be changed. One of the intended reaction to this event would be to call retrieveFiltersWithValuesAsText method.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachBeforeVariantFetch

Attaches event handler fnFunction to the beforeVariantFetch event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired before a variant is fetched.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachBeforeVariantSave

Attaches event handler fnFunction to the beforeVariantSave event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired before a variant is saved. The event can be used to adapt the data of the custom filters, which will be saved as variant later.

Since 1.48.2 Replaced by the event <code>beforeVariantFetch</code>
Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachCancel

Attaches event handler fnFunction to the cancel event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Cancel button on the Filters dialog is pressed and the variant is marked as dirty.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachClear

Attaches event handler fnFunction to the clear event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Clear button is pressed. The consumer has to clear all filters.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachFilterChange

Attaches event handler fnFunction to the filterChange event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when a filter or multiple filters has changed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachFiltersDialogBeforeOpen

Attaches event handler fnFunction to the filtersDialogBeforeOpen event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after the filters dialog 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.ui.comp.filterbar.FilterBar itself

attachFiltersDialogCancel

Attaches event handler fnFunction to the filtersDialogCancel event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Cancel button on the filters dialog is pressed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachFiltersDialogClosed

Attaches event handler fnFunction to the filtersDialogClosed event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after the filters dialog is closed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachFiltersDialogSearch

Attaches event handler fnFunction to the filtersDialogSearch event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Go button on the filters dialog is pressed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachFiltersDialogSearchForFilters

Attaches event handler fnFunction to the filtersDialogSearchForFilters event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when search field of the filter dialog is changed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachInitialise

Attaches event handler fnFunction to the initialise event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the FilterBar is initialized to indicate that metadata are available.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachInitialized

Attaches event handler fnFunction to the initialized event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired after the FilterBar has been initialized, the user's default variant has been applied, and a stable filter state has been achieved. With this event all relevant filter information, for example, for navigation-related actions, is available via sap.ui.comp.filterbar.FilterBar#getUiState.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachReset

Attaches event handler fnFunction to the reset event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Restore button is pressed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

attachSearch

Attaches event handler fnFunction to the search event of this sap.ui.comp.filterbar.FilterBar.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.comp.filterbar.FilterBar itself.

This event is fired when the Go button is pressed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterBar itself

clearVariantSelection

Resets the current selection in the variant management control to standard.

destroyFilterGroupItems

Destroys all the filterGroupItems in the aggregation filterGroupItems.

destroyFilterItems

Destroys all the filterItems in the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.

detachAfterVariantLoad

Detaches event handler fnFunction from the afterVariantLoad event of this sap.ui.comp.filterbar.FilterBar.

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

detachAfterVariantSave

Detaches event handler fnFunction from the afterVariantSave event of this sap.ui.comp.filterbar.FilterBar.

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

detachAssignedFiltersChanged

Detaches event handler fnFunction from the assignedFiltersChanged event of this sap.ui.comp.filterbar.FilterBar.

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

detachBeforeVariantFetch

Detaches event handler fnFunction from the beforeVariantFetch event of this sap.ui.comp.filterbar.FilterBar.

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

detachBeforeVariantSave

Detaches event handler fnFunction from the beforeVariantSave event of this sap.ui.comp.filterbar.FilterBar.

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

Since 1.48.2 Replaced by the event <code>beforeVariantFetch</code>
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

detachCancel

Detaches event handler fnFunction from the cancel event of this sap.ui.comp.filterbar.FilterBar.

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

detachClear

Detaches event handler fnFunction from the clear event of this sap.ui.comp.filterbar.FilterBar.

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

detachFilterChange

Detaches event handler fnFunction from the filterChange event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogBeforeOpen

Detaches event handler fnFunction from the filtersDialogBeforeOpen event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogCancel

Detaches event handler fnFunction from the filtersDialogCancel event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogClosed

Detaches event handler fnFunction from the filtersDialogClosed event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogSearch

Detaches event handler fnFunction from the filtersDialogSearch event of this sap.ui.comp.filterbar.FilterBar.

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

detachFiltersDialogSearchForFilters

Detaches event handler fnFunction from the filtersDialogSearchForFilters event of this sap.ui.comp.filterbar.FilterBar.

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

detachInitialise

Detaches event handler fnFunction from the initialise event of this sap.ui.comp.filterbar.FilterBar.

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

detachInitialized

Detaches event handler fnFunction from the initialized event of this sap.ui.comp.filterbar.FilterBar.

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.ui.comp.filterbar.FilterBar.

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

detachSearch

Detaches event handler fnFunction from the search event of this sap.ui.comp.filterbar.FilterBar.

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

determineControlByFilterItem

Retrieves the control associated to the filter.

Param Type DefaultValue Description
oFilterItem sap.ui.comp.filterbar.FilterItem

From the aggregations

bConsiderParameters boolean

check also analytics parameter

determineControlByName

Retrieves the control based on the name and group name.

Param Type DefaultValue Description
sName string

Name of the filter.

sGroupName string

Group name of the filter; null for filter that belongs to basic group.

determineFilterItemByName

Retrieves the filter corresponding to the filter name.

Param Type DefaultValue Description
sName string

the control's name

determineLabelByName

Retrieves the associated label based on the name and group name.

Param Type DefaultValue Description
sName string

Name of the filter.

sGroupName string

Group name of the filter; null for filter that belongs to basic group.

determineMandatoryFilterItems

Retrieves the mandatory filters.

sap.ui.comp.filterbar.FilterBar.extend

Creates a new subclass of class sap.ui.comp.filterbar.FilterBar 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.layout.Grid.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

fetchVariant

Creates and returns the variant representation.

fireAfterVariantSave

Fires event afterVariantSave to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireAssignedFiltersChanged

Fires event assignedFiltersChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireBeforeVariantFetch

Fires event beforeVariantFetch to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireCancel

Fires event cancel to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireClear

Fires event clear to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

selectionSet sap.ui.core.Control[]

Visible controls

fireFiltersDialogBeforeOpen

Fires event filtersDialogBeforeOpen to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFiltersDialogCancel

Fires event filtersDialogCancel to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFiltersDialogClosed

Fires event filtersDialogClosed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

context string

Context of the event. Can also be null or undefined

fireFiltersDialogSearch

Fires event filtersDialogSearch to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFiltersDialogSearchForFilters

Fires event filtersDialogSearchForFilters to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

newValue string

Contains the entered search filed value

fireInitialise

Fires event initialise to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireInitialized

Fires event initialized to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireReset

Fires event reset to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

selectionSet sap.ui.core.Control[]

Visible controls

fireSearch

Fires event search to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

selectionSet sap.ui.core.Control[]

Visible controls

getAdvancedMode

Gets current value of property advancedMode.

The advanced mode is only relevant for the value help scenario. UI representation is different from the standard FilterBar.

Default value is false.

getAllFilterItems

Retrieves filters belonging to the current variant.

Param Type DefaultValue Description
bConsiderOnlyVisibleFields boolean

Indicates that only visible filters are retrieved. Note: hidden filters are treated as visible filters.

getBasicSearch

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

getBasicSearchName

Determine the internal basic search field name.

getBasicSearchValue

Determine the value of the basic search.

getConsiderGroupTitle

Gets current value of property considerGroupTitle.

If this property is set, then the label for filters will be prefixed with the group title.

Default value is false.

getCurrentVariantId

Retrieves the current variant ID.

getDataSuiteFormat

Retrieves the current variant as selection variant for UI navigation

Since 1.48 replaced by {@link sap.ui.comp.filterbar.FilterBar#getUiState}
Param Type DefaultValue Description
bConsiderAllFilters boolean

also include empty/invisible fields filter data

getDeltaVariantMode

Gets current value of property deltaVariantMode.

Stores the delta as compared to the standard variant.

Default value is true.

getDescriptionForKeys

Reads the descriptions for given filters and value keys.

Param Type DefaultValue Description
aFiltersWithValuesToBeRead array

List of filters with value keys to be retrieved

getFilterBarExpanded

Gets current value of property filterBarExpanded.

Shows the filters area. When property useToolbar is set to false, filterBarExpanded is set to true automatically. Note: When SmartFilterBar is used inside a ValueHelpDialog, it is initially collapsed. The filter bar is initially expanded in the following cases:

- When there is no basic search field. - When preventInitialDataFetchInValueHelpDialog is set to true or the fetchValues property of the valueList annotation is set to 2. - When there are mandatory fields, all fields are expanded (not only the first 7).

Default value is true.

getFilterContainerWidth

Gets current value of property filterContainerWidth.

Sets the width of the filters container.

Default value is "12rem".

getFilterDialogContent

Returns the filter dialog content. Node:The original content is a Form. The form may be enhanced with a toolbar to enable the inner switch to an added custom content. Besides such operations, the original content should not be manipulated in any way.

getFilterGroupItems

Gets content of aggregation filterGroupItems.

Contains all FilterBar filters.
Note:In case a filter has to be added to the basic group

getFilterItems

Gets content of aggregation filterItems.

Filters belonging to the basic group.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.

getHeader

Gets current value of property header.

Specifies header text that is shown in the toolbar on the first position. This property is ignored, when useToolbar is set to false.

Default value is empty string.

getInitializedPromise

Returns promise which will be resolve when the initialized event is fired.

getIsRunningInValueHelpDialog

Gets current value of property isRunningInValueHelpDialog.

Sets whether the filter bar should look like the filters area in a ValueHelpDialog. True for SmartFilterBar when used in a ValueHelpDialog. False otherwise.

Default value is false.

sap.ui.comp.filterbar.FilterBar.getMetadata

Returns a metadata object for class sap.ui.comp.filterbar.FilterBar.

getPersistencyKey

Gets current value of property persistencyKey.

Key used to access personalization data. Only if the persistencyKey is provided, will the VariantManagement control be used.

Default value is empty string.

getSearchEnabled

Gets current value of property searchEnabled.

Enables/disables the Search button.

Default value is true.

getShowClearButton

Gets current value of property showClearButton.

Handles visibility of the Clear button on the Filters dialog.

Default value is false.

getShowClearOnFB

Gets current value of property showClearOnFB.

Handles visibility of the Clear button on the FilterBar.

Default value is false.

getShowFilterConfiguration

Gets current value of property showFilterConfiguration.

Handles visibility of the Filters button on the FilterBar.

Default value is true.

getShowGoButton

Gets current value of property showGoButton.

Handles visibility of the Go button on the FilterBar.

Since 1.28.0 Replaced by property <code>showGoOnFB</code>

getShowGoOnFB

Gets current value of property showGoOnFB.

Handles visibility of the Go button on the FilterBar.

Default value is true.

getShowRestoreButton

Gets current value of property showRestoreButton.

Handles visibility of the "Restore" button on the "Filters" dialog. Note: Restore works only automatically when a property persistencyKey is set and therefore Variant Management is used. In all other cases the "restore" behavior needs to be implemented by the app, based on the event reset. Since 1.84 the "Restore" button text is changed to "Reset"

Default value is true.

getShowRestoreOnFB

Gets current value of property showRestoreOnFB.

Handles visibility of the Restore button on the FilterBar.

Default value is false.

getUiState

Retrieves the current UI state of the FilterBar control.
The current UI state represents the data suite format.

Param Type DefaultValue Description
mProperties Object<string,any>

controls the API behavior

allFilters boolean false

include empty/invisible fields filter data

getUseSnapshot

Gets current value of property useSnapshot.

Determines the behavior when reset is executed.
Note: This property is only relevant if no variant management is used, and the filter bar is not used in the advanced mode. A snapshot shows the current state of the filter bar, just before the Filters dialog is opened.

getUseToolbar

Gets current value of property useToolbar.

Determines what design is used. Default is the design with toolbar. If the property useToolbar is set to false, the property filterBarExpanded is set to true automatically. Note:
If set to false, the VariantManagement control is not available at all. This scenario is only intended for the sap.ui.comp.smartfilterbar.SmartFilterBar.

Default value is true.

getVariantManagement

Returns the associated VariantManagement control. The returned VariantManagement instance should not be cached or manipulated in any ways. It should offer the application a convenient way to verify the dirty state and to check for page variant scenario. The method may return null or a disabled VariantManagement control.

hideGoButton

Hides the Go button on FilterBar. Allows to hide the Go-button for dedicated scenarios, like liveMode.

indexOfFilterGroupItem

Checks for the provided sap.ui.comp.filterbar.FilterGroupItem in the aggregation filterGroupItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oFilterGroupItem sap.ui.comp.filterbar.FilterGroupItem

The filterGroupItem whose index is looked for

indexOfFilterItem

Checks for the provided sap.ui.comp.filterbar.FilterItem in the aggregation filterItems. and returns its index if found or -1 otherwise.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
Param Type DefaultValue Description
oFilterItem sap.ui.comp.filterbar.FilterItem

The filterItem whose index is looked for

isCurrentVariantExecuteOnSelectEnabled

Returns the information whether the flag 'executeOnSelect' is set or not on current variant.

isCurrentVariantStandard

Determines if the current variant is the standard variant

isDialogOpen

Determines if the filters dialog is opened.

registerApplyData

Registration of a callback function. The provided callback function is executed when a variant must be applied. The callback function will receive the corresponding data set containing all relevant data in JSON, as initially provided by the callback for fetchData.

Param Type DefaultValue Description
fCallBack function

Called when a variant must be applied

registerFetchData

Registration of a callback function. The provided callback function is executed when saving a variant is triggered and must provide all relevant fields and values in JSON.

Param Type DefaultValue Description
fCallBack function

Called when a variant must be fetched

registerGetFiltersWithValues

Registration of a callback function. The provided callback function is executed to obtain the filters with values.

Param Type DefaultValue Description
fCallBack function

Called when a variant must be applied

removeAllFilterGroupItems

Removes all entries in the aggregation filterGroupItems.

removeAllFilterItems

Removes all entries in the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.

removeAllFilters

Removes all entries in the aggregations filterItems, filterGroupItems, basicSearch

removeFilterGroupItem

Removes a filterGroupItem from the aggregation filterGroupItems.

Param Type DefaultValue Description
vFilterGroupItem int string sap.ui.comp.filterbar.FilterGroupItem

The filterGroupItem to remove or its index or id

removeFilterItem

Removes a filterItem from the aggregation filterItems.

Since 1.48.0 Use aggregation <code>filterGroupItems</code> instead.
Param Type DefaultValue Description
vFilterItem int string sap.ui.comp.filterbar.FilterItem

The filterItem to remove or its index or id

rerenderFilters

Adapts the visibility for all filter containers.

restoreGoButton

Restores the visibility of the Go button on FilterBar. The visibility of the Go button will be set, according to the showGoOnFB property.

retrieveFiltersWithValues

Retrieves the labels of all visible filters that belongs to the current variant and have an assigned value.

retrieveFiltersWithValuesAsText

Returns a summary string that contains information about the filters currently assigned. The string starts with "Filtered By", followed by the number of set filters and their labels.
Example:
Filtered By (3): Company Code, Fiscal Year, Customer

search

Executes the search event. Controls of all visible filters will be passed as event-parameters.

setAdvancedMode

Sets a new value for property advancedMode.

The advanced mode is only relevant for the value help scenario. UI representation is different from the standard FilterBar.

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

New value for property advancedMode

setBasicSearch

Sets the associated basicSearch.

Param Type DefaultValue Description
oBasicSearch sap.ui.core.ID sap.m.SearchField

ID of an element which becomes the new target of this basicSearch association; alternatively, an element instance may be given

setConsiderGroupTitle

Sets a new value for property considerGroupTitle.

If this property is set, then the label for filters will be prefixed with the group title.

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

New value for property considerGroupTitle

setContentHeight

Sets the height of the content area of the dialog. The passed dimension will be interpreted as 'px'.

Param Type DefaultValue Description
fHeight float

the content height of the filters dialog.

setContentWidth

Sets the width of the content area of the dialog. The passed dimension will be interpreted as 'px'.

Param Type DefaultValue Description
fWidth float

the content width of the filters dialog.

setCurrentVariantId

Sets the current variant ID.

Param Type DefaultValue Description
sVariantId string

ID of the variant

bDoNotApplyVariant boolean

If set to true, the applyVariant method is not executed yet. Relevant during navigation, when called before the initialise event has been executed.

setDataSuiteFormat

Sets the selection variant for UI navigation to FilterBar.

Since 1.48 replaced by {@link sap.ui.comp.filterbar.FilterBar#setUiState}
Param Type DefaultValue Description
sSuiteData string

Represents the selection variants for UI navigation

bReplace boolean

Replaces existing filter data

setDeltaVariantMode

Sets a new value for property deltaVariantMode.

Stores the delta as compared to the standard variant.

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

Default value is true.

Param Type DefaultValue Description
bDeltaVariantMode boolean true

New value for property deltaVariantMode

setFilterBarExpanded

Sets a new value for property filterBarExpanded.

Shows the filters area. When property useToolbar is set to false, filterBarExpanded is set to true automatically. Note: When SmartFilterBar is used inside a ValueHelpDialog, it is initially collapsed. The filter bar is initially expanded in the following cases:

- When there is no basic search field. - When preventInitialDataFetchInValueHelpDialog is set to true or the fetchValues property of the valueList annotation is set to 2. - When there are mandatory fields, all fields are expanded (not only the first 7).

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

Default value is true.

Param Type DefaultValue Description
bFilterBarExpanded boolean true

New value for property filterBarExpanded

setFilterContainerWidth

Sets a new value for property filterContainerWidth.

Sets the width of the filters container.

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

Default value is "12rem".

Param Type DefaultValue Description
sFilterContainerWidth string "12rem"

New value for property filterContainerWidth

setHeader

Sets a new value for property header.

Specifies header text that is shown in the toolbar on the first position. This property is ignored, when useToolbar is set to false.

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

Default value is empty string.

Param Type DefaultValue Description
sHeader string ""

New value for property header

setIsRunningInValueHelpDialog

Sets a new value for property isRunningInValueHelpDialog.

Sets whether the filter bar should look like the filters area in a ValueHelpDialog. True for SmartFilterBar when used in a ValueHelpDialog. False otherwise.

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

New value for property isRunningInValueHelpDialog

setPersistencyKey

Sets a new value for property persistencyKey.

Key used to access personalization data. Only if the persistencyKey is provided, will the VariantManagement control be used.

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

Default value is empty string.

Param Type DefaultValue Description
sPersistencyKey string ""

New value for property persistencyKey

setSearchEnabled

Sets a new value for property searchEnabled.

Enables/disables the Search button.

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

Default value is true.

Param Type DefaultValue Description
bSearchEnabled boolean true

New value for property searchEnabled

setShowClearButton

Sets a new value for property showClearButton.

Handles visibility of the Clear button on the Filters dialog.

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

New value for property showClearButton

setShowClearOnFB

Sets a new value for property showClearOnFB.

Handles visibility of the Clear button on the FilterBar.

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

New value for property showClearOnFB

setShowFilterConfiguration

Sets a new value for property showFilterConfiguration.

Handles visibility of the Filters button on the FilterBar.

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

Default value is true.

Param Type DefaultValue Description
bShowFilterConfiguration boolean true

New value for property showFilterConfiguration

setShowGoButton

Sets a new value for property showGoButton.

Handles visibility of the Go button on the FilterBar.

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

Since 1.28.0 Replaced by property <code>showGoOnFB</code>
Param Type DefaultValue Description
bShowGoButton boolean

New value for property showGoButton

setShowGoOnFB

Sets a new value for property showGoOnFB.

Handles visibility of the Go button on the FilterBar.

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

Default value is true.

Param Type DefaultValue Description
bShowGoOnFB boolean true

New value for property showGoOnFB

setShowOldFilterDialog

Once set, the activation of the 'Adapt Filters' button will open the 'old' filters dialog. This method offers an intermediate solution for the visual filters scenario, which relies on the old filters dialog.

setShowRestoreButton

Sets a new value for property showRestoreButton.

Handles visibility of the "Restore" button on the "Filters" dialog. Note: Restore works only automatically when a property persistencyKey is set and therefore Variant Management is used. In all other cases the "restore" behavior needs to be implemented by the app, based on the event reset. Since 1.84 the "Restore" button text is changed to "Reset"

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

Default value is true.

Param Type DefaultValue Description
bShowRestoreButton boolean true

New value for property showRestoreButton

setShowRestoreOnFB

Sets a new value for property showRestoreOnFB.

Handles visibility of the Restore button on the FilterBar.

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

New value for property showRestoreOnFB

setUiState

Sets the current UI state of the FilterBar control.
The current UI state represents the data suite format.

Param Type DefaultValue Description
oUiState sap.ui.comp.state.UIState

object representing the ui-state. Currently only the SelectionVariant part is considered.

mProperties Object<string,any>

controls the API behavior

replace boolean

Replaces existing filter data

strictMode boolean

Determines filters and parameters based on the name.

  • true: Determines filters and parameters based on their exact name and type. If there is no exact match, the filter/parameter will be ignored.
  • false: Determines parameters first following this rule set:
    • If a parameter is found, use it.
    • If a filter is found, check first if a matching parameter exists with the filter name prefixed with "P_". If there is a match, use it as parameter, otherwise use it as filter.

setUiStateAsVariant

Apply the SelectionPresentationVariant annotated information as a variant. The current UI state represents the data suite format.

Param Type DefaultValue Description
oUiState sap.ui.comp.state.UIState

object representing the ui-state.Only the SelectionVariant part is considered.

setUseSnapshot

Sets a new value for property useSnapshot.

Determines the behavior when reset is executed.
Note: This property is only relevant if no variant management is used, and the filter bar is not used in the advanced mode. A snapshot shows the current state of the filter bar, just before the Filters dialog is opened.

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

Param Type DefaultValue Description
bUseSnapshot boolean

New value for property useSnapshot

setUseToolbar

Sets a new value for property useToolbar.

Determines what design is used. Default is the design with toolbar. If the property useToolbar is set to false, the property filterBarExpanded is set to true automatically. Note:
If set to false, the VariantManagement control is not available at all. This scenario is only intended for the sap.ui.comp.smartfilterbar.SmartFilterBar.

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

Default value is true.

Param Type DefaultValue Description
bUseToolbar boolean true

New value for property useToolbar

showAdaptFilterDialog

Opens the Adapt Filters Dialog

Param Type DefaultValue Description
sView String

initially shown view

showAdaptFilterDialogForKeyUser

Opens the Adapt Filters Dialog for the UI adaptation.
Note: This function must only be used internally during the UI adaptation.

Param Type DefaultValue Description
sStyleClass String

indicating the ui adaption area

fCallBack function

will be executed, once the dialog closes with 'Save'

showFilterDialog

For backward compatibility. Creates adapt filters dialog

variantsInitialized

This method will be called by the SmartVariantMangement and indicates, that the standard variant was obtained. It indicates, that the variant management is fully initialized.