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 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 |
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. |
deltaVariantMode | boolean | true | Stores the delta as compared to the standard variant. |
expandAdvancedArea | boolean | false | Collapses/expands the advanced area. Visibility: public |
filterBarExpanded | boolean | true | Shows the filters area. When property - When there is no basic search field. - When |
filterContainerWidth | string | 12rem | Sets the width of the filters container. |
header | string | empty string | Specifies header text that is shown in the toolbar on the first position. This property is ignored, when |
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 |
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. |
showFilterConfiguration | boolean | true | Handles visibility of the Filters button on the FilterBar. |
showGoButton | boolean | Handles visibility of the Go button on the FilterBar. |
|
showGoOnFB | boolean | true | Handles visibility of the Go button on the FilterBar. |
showRestoreButton | boolean | true | Handles visibility of the "Restore" button on the "Filters" dialog. Note: Restore works only automatically when a property |
showRestoreOnFB | boolean | false | Handles visibility of the Restore button on the FilterBar. |
useSnapshot | boolean | Determines the behavior when
Since: 1.44.Visibility: public |
|
useToolbar | boolean | true | Determines what design is used. Default is the design with toolbar. If the property |
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.
|
filterItems | 0..n | sap.ui.comp.filterbar.FilterItem |
Filters belonging to the basic group. |
Name | Cardinality | Type | Description |
---|---|---|---|
basicSearch | 0..1 | sap.m.SearchField |
Populates the basic search area on the FilterBar and the Filters dialog. |
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 |
beforeVariantFetch |
This event is fired before a variant is fetched. |
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. |
filtersDialogCancel |
This event is fired when the Cancel button on the filters dialog is pressed. |
filtersDialogClosed |
This event is fired after the filters dialog is closed. |
filtersDialogSearch |
This event is fired when the Go button on the filters dialog is pressed. |
filtersDialogSearchForFilters |
This event is fired when search field of the filter dialog is changed. |
initialise |
This event is fired when the FilterBar is initialized to indicate that metadata are available. |
initialized |
This event is fired after the |
reset |
This event is fired when the Restore button is pressed. |
search |
This event is fired when the Go button is pressed. |
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 |
executeOnSelect | boolean |
executeOnSelect indicates if the variant will trigger search |
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 |
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 |
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 |
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.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
context | string |
Context of the event. Can also be |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Method | Description |
---|---|
_addParameter |
Adds a |
_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 When called, the context of the event handler (its 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 When called, the context of the event handler (its This event is fired after a variant has been saved. |
attachAssignedFiltersChanged |
Attaches event handler When called, the context of the event handler (its 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 |
attachBeforeVariantFetch |
Attaches event handler When called, the context of the event handler (its This event is fired before a variant is fetched. |
attachBeforeVariantSave |
Attaches event handler When called, the context of the event handler (its 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 When called, the context of the event handler (its 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 When called, the context of the event handler (its This event is fired when the Clear button is pressed. The consumer has to clear all filters. |
attachFilterChange |
Attaches event handler When called, the context of the event handler (its This event is fired when a filter or multiple filters has changed. |
attachFiltersDialogBeforeOpen |
Attaches event handler When called, the context of the event handler (its This event is fired after the filters dialog is opened. |
attachFiltersDialogCancel |
Attaches event handler When called, the context of the event handler (its This event is fired when the Cancel button on the filters dialog is pressed. |
attachFiltersDialogClosed |
Attaches event handler When called, the context of the event handler (its This event is fired after the filters dialog is closed. |
attachFiltersDialogSearch |
Attaches event handler When called, the context of the event handler (its This event is fired when the Go button on the filters dialog is pressed. |
attachFiltersDialogSearchForFilters |
Attaches event handler When called, the context of the event handler (its This event is fired when search field of the filter dialog is changed. |
attachInitialise |
Attaches event handler When called, the context of the event handler (its This event is fired when the FilterBar is initialized to indicate that metadata are available. |
attachInitialized |
Attaches event handler When called, the context of the event handler (its This event is fired after the |
attachReset |
Attaches event handler When called, the context of the event handler (its This event is fired when the Restore button is pressed. |
attachSearch |
Attaches event handler When called, the context of the event handler (its 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 The passed function and listener object must match the ones used for event registration. |
detachAfterVariantSave |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachAssignedFiltersChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeVariantFetch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeVariantSave |
Detaches event handler 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 The passed function and listener object must match the ones used for event registration. |
detachClear |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFilterChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFiltersDialogBeforeOpen |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFiltersDialogCancel |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFiltersDialogClosed |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFiltersDialogSearch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachFiltersDialogSearchForFilters |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachInitialise |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachInitialized |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachReset |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachSearch |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
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
|
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 |
getAllFilterItems |
Retrieves filters belonging to the current variant. |
getBasicSearch |
ID of the element which is the current target of the association basicSearch, or |
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 |
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 |
getDescriptionForKeys |
Reads the descriptions for given filters and value keys. |
getFilterBarExpanded |
Gets current value of property filterBarExpanded. Shows the filters area. When property - When there is no basic search field. - When Default value is |
getFilterContainerWidth |
Gets current value of property filterContainerWidth. Sets the width of the filters container. Default value is |
getFilterDialogContent |
Returns the filter dialog content. |
getFilterGroupItems |
Gets content of aggregation filterGroupItems. Contains all FilterBar filters.
|
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 Default value is |
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 |
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 Default value is |
getSearchEnabled |
Gets current value of property searchEnabled. Enables/disables the Search button. Default value is |
getShowClearButton |
Gets current value of property showClearButton. Handles visibility of the Clear button on the Filters dialog. Default value is |
getShowClearOnFB |
Gets current value of property showClearOnFB. Handles visibility of the Clear button on the FilterBar. Default value is |
getShowFilterConfiguration |
Gets current value of property showFilterConfiguration. Handles visibility of the Filters button on the FilterBar. Default value is |
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 |
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 Default value is |
getShowRestoreOnFB |
Gets current value of property showRestoreOnFB. Handles visibility of the Restore button on the FilterBar. Default value is |
getUiState |
Retrieves the current UI state of the |
getUseSnapshot |
Gets current value of property useSnapshot. Determines the behavior when
|
getUseToolbar |
Gets current value of property useToolbar. Determines what design is used. Default is the design with toolbar. If the property Default value is |
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 |
hideGoButton |
Hides the Go button on FilterBar. Allows to hide the Go-button for dedicated scenarios, like liveMode. |
indexOfFilterGroupItem |
Checks for the provided |
indexOfFilterItem |
Checks for the provided
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. |
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 Default value is |
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 Default value is |
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 Default value is |
setFilterBarExpanded |
Sets a new value for property filterBarExpanded. Shows the filters area. When property - When there is no basic search field. - When When called with a value of Default value is |
setFilterContainerWidth |
Sets a new value for property filterContainerWidth. Sets the width of the filters container. When called with a value of Default value is |
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 When called with a value of Default value is |
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 Default value is |
setPersistencyKey |
Sets a new value for property persistencyKey. Key used to access personalization data. Only if the persistencyKey is provided, will the When called with a value of Default value is |
setSearchEnabled |
Sets a new value for property searchEnabled. Enables/disables the Search button. When called with a value of Default value is |
setShowClearButton |
Sets a new value for property showClearButton. Handles visibility of the Clear button on the Filters dialog. When called with a value of Default value is |
setShowClearOnFB |
Sets a new value for property showClearOnFB. Handles visibility of the Clear button on the FilterBar. When called with a value of Default value is |
setShowFilterConfiguration |
Sets a new value for property showFilterConfiguration. Handles visibility of the Filters button on the FilterBar. When called with a value of Default value is |
setShowGoButton |
Sets a new value for property showGoButton. Handles visibility of the Go button on the FilterBar. When called with a value of
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 Default value is |
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 When called with a value of Default value is |
setShowRestoreOnFB |
Sets a new value for property showRestoreOnFB. Handles visibility of the Restore button on the FilterBar. When called with a value of Default value is |
setUiState |
Sets the current UI state of the |
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
When called with a value of |
setUseToolbar |
Sets a new value for property useToolbar. Determines what design is used. Default is the design with toolbar. If the property When called with a value of Default value is |
showAdaptFilterDialog |
Opens the Adapt Filters Dialog |
showAdaptFilterDialogForKeyUser |
Opens the Adapt Filters Dialog for 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. |
Adds a FilterGroupItem
element to the aggregation _parameters
.
Param | Type | DefaultValue | Description |
---|---|---|---|
oParameter | sap.ui.comp.filterbar.FilterGroupItem |
adding a analytical parameter |
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. |
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 |
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. |
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 |
Adds some filterItem to the aggregation filterItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFilterItem | sap.ui.comp.filterbar.FilterItem |
The filterItem to add; if empty, nothing is inserted |
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. |
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 |
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 |
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 |
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 |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Attaches event handler fnFunction
to the 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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Destroys all the filterItems in the aggregation filterItems.
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 |
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 |
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 |
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 |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Detaches event handler fnFunction
from the 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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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; |
Retrieves the filter corresponding to the filter name.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string |
the control's name |
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; |
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 |
Fires event afterVariantSave to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event assignedFiltersChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event beforeVariantFetch to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event cancel to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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 |
Fires event filtersDialogBeforeOpen to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event filtersDialogCancel to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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 |
Fires event filtersDialogSearch to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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 |
Fires event initialise to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Fires event initialized to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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 |
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 |
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
.
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. |
ID of the element which is the current target of the association basicSearch, or null
.
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
.
Retrieves the current variant as selection variant for UI navigation
Param | Type | DefaultValue | Description |
---|---|---|---|
bConsiderAllFilters | boolean |
also include empty/invisible fields filter data |
Gets current value of property deltaVariantMode.
Stores the delta as compared to the standard variant.
Default value is true
.
Reads the descriptions for given filters and value keys.
Param | Type | DefaultValue | Description |
---|---|---|---|
aFiltersWithValuesToBeRead | array |
List of filters with value keys to be retrieved |
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
.
Gets current value of property filterContainerWidth.
Sets the width of the filters container.
Default value is "12rem"
.
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.
Gets content of aggregation filterGroupItems.
Contains all FilterBar filters.
Note:
In case a filter has to be added to the basic group
groupName
has to be set to the constant sap.ui.comp.filterbar.FilterBar.INTERNAL_GROUP
groupLabel
will be handled internally and will be ignored, if setpartOfCurrentVariant
has to be set to true
visibleInFilterBar
is set to true
, the property partOfCurrentVariant
will be set internally also to true
Gets content of aggregation filterItems.
Filters belonging to the basic group.
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
.
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
.
Returns a metadata object for class sap.ui.comp.filterbar.FilterBar.
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
.
Gets current value of property searchEnabled.
Enables/disables the Search button.
Default value is true
.
Gets current value of property showClearButton.
Handles visibility of the Clear button on the Filters dialog.
Default value is false
.
Gets current value of property showClearOnFB.
Handles visibility of the Clear button on the FilterBar.
Default value is false
.
Gets current value of property showFilterConfiguration.
Handles visibility of the Filters button on the FilterBar.
Default value is true
.
Gets current value of property showGoButton.
Handles visibility of the Go button on the FilterBar.
Gets current value of property showGoOnFB.
Handles visibility of the Go button on the FilterBar.
Default value is true
.
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
.
Gets current value of property showRestoreOnFB.
Handles visibility of the Restore button on the FilterBar.
Default value is false
.
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 |
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 triggeredfalse
defines that the snapshot will not be appliedtrue
is not considered at allGets 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
.
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.
Hides the Go button on FilterBar. Allows to hide the Go-button for dedicated scenarios, like liveMode.
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 |
Checks for the provided sap.ui.comp.filterbar.FilterItem
in the aggregation filterItems. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oFilterItem | sap.ui.comp.filterbar.FilterItem |
The filterItem whose index is looked for |
Returns the information whether the flag 'executeOnSelect' is set or not on current variant.
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 |
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 |
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 |
Removes all entries in the aggregation filterItems.
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 |
Removes a filterItem from the aggregation filterItems.
Param | Type | DefaultValue | Description |
---|---|---|---|
vFilterItem | int string sap.ui.comp.filterbar.FilterItem |
The filterItem to remove or its index or id |
Restores the visibility of the Go button on FilterBar. The visibility of the Go button will be set, according to the showGoOnFB property.
Retrieves the labels of all visible filters that belongs to the current variant and have an assigned value.
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
Executes the search event. Controls of all visible filters will be passed as event-parameters.
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 |
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 |
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 |
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. |
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. |
Sets the current variant ID.
Param | Type | DefaultValue | Description |
---|---|---|---|
sVariantId | string |
ID of the variant |
|
bDoNotApplyVariant | boolean |
If set to |
Sets the selection variant for UI navigation to FilterBar.
Param | Type | DefaultValue | Description |
---|---|---|---|
sSuiteData | string |
Represents the selection variants for UI navigation |
|
bReplace | boolean |
Replaces existing filter data |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowGoButton | boolean |
New value for property |
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 |
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.
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 |
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 |
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.
|
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. |
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 triggeredfalse
defines that the snapshot will not be appliedtrue
is not considered at allWhen 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 |
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 |
Opens the Adapt Filters Dialog
Param | Type | DefaultValue | Description |
---|---|---|---|
sView | String |
initially shown view |
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' |