class sap.m.P13nFilterPanel

Control sample: sap.m.P13nFilterPanel
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Extends: sap.m.P13nPanel
Module: sap/m/P13nFilterPanel
Application Component: CA-UI5-CMP

The P13nFilterPanel control is used to define filter-specific settings for table personalization.


Constructor

Constructor for a new P13nFilterPanel.

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

new sap.m.P13nFilterPanel(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
containerQuery boolean false

Defines if the mediaQuery or a ContainerResize is used for layout update. If the ConditionPanel is used in a dialog, the property must be set to true.

Visibility: public
enableEmptyOperations boolean false

Should empty operation be enabled for certain data types. This is also based on their nullable setting.

Visibility: public
layoutMode string

Can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or"Phone" you can set a fixed layout.

Visibility: public
maxExcludes string -1

Defines the maximum number of exclude filters.

Visibility: public
maxIncludes string -1

Defines the maximum number of include filters.

Visibility: public

Borrowed Properties

Name Type Default Value Description
changeNotifier object

Callback which notifies a change on this panel.

Visibility: public
title string

Title text appears in the panel.

Visibility: public
titleLarge string

Large title text appears e.g. in dialog header in case that only one panel is shown.

Since: 1.30.0.

Visibility: public
type string

Panel type for generic use. Due to extensibility reason the type of type property should be string. So it is feasible to add a custom panel without expanding the type.

Visibility: public
validationExecutor object

Callback method which is called in order to validate end user entry.

Visibility: public
validationListener object

Callback method which is called in order to register for validation result.

Visibility: public
verticalScrolling boolean true

Enables the vertical Scrolling on the P13nDialog when the panel is shown.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
content 0..n sap.ui.core.Control

Contains content for include and exclude panels.

filterItems 0..n sap.m.P13nFilterItem

Defines filter items.

messageStrip 0..1 sap.m.MessageStrip

Defines an optional message strip to be displayed in the content area

Borrowed Aggregations

Name Cardinality Type Description
items 0..n sap.m.P13nItem

Defines personalization items (e.g. columns in the P13nColumnsPanel).


Events Overview

Event Description
addFilterItem

Event raised if a filter item has been added.

filterItemChanged

Event raised if a filter item has been changed. reason can be added, updated or removed.

removeFilterItem

Event raised if a filter item has been removed.

updateFilterItem

Event raised if a filter item has been updated.

addFilterItem

Event raised if a filter item has been added.

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

filterItemChanged

Event raised if a filter item has been changed. reason can be added, updated or removed.

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

reason for the changeFilterItem event. Value can be added, updated or removed.

key string

key of the changed filterItem

index int

index of the changed filterItem

itemData object

JSON object of the changed filterItem instance (in case of reason=="removed" the itemData parameter does not exist)

removeFilterItem

Event raised if a filter item has been removed.

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

updateFilterItem

Event raised if a filter item has been updated.

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

Methods Overview

Method Description
addFilterItem

Adds some filterItem to the aggregation filterItems.

attachAddFilterItem

Attaches event handler fnFunction to the addFilterItem event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been added.

attachFilterItemChanged

Attaches event handler fnFunction to the filterItemChanged event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been changed. reason can be added, updated or removed.

attachRemoveFilterItem

Attaches event handler fnFunction to the removeFilterItem event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been removed.

attachUpdateFilterItem

Attaches event handler fnFunction to the updateFilterItem event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been updated.

bindFilterItems

Binds aggregation filterItems to model data.

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

destroyFilterItems

Destroys all the filterItems in the aggregation filterItems.

destroyMessageStrip

Destroys the messageStrip in the aggregation messageStrip.

detachAddFilterItem

Detaches event handler fnFunction from the addFilterItem event of this sap.m.P13nFilterPanel.

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

detachFilterItemChanged

Detaches event handler fnFunction from the filterItemChanged event of this sap.m.P13nFilterPanel.

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

detachRemoveFilterItem

Detaches event handler fnFunction from the removeFilterItem event of this sap.m.P13nFilterPanel.

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

detachUpdateFilterItem

Detaches event handler fnFunction from the updateFilterItem event of this sap.m.P13nFilterPanel.

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

sap.m.P13nFilterPanel.extend

Creates a new subclass of class sap.m.P13nFilterPanel with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.P13nPanel.extend.

fireAddFilterItem

Fires event addFilterItem to attached listeners.

fireFilterItemChanged

Fires event filterItemChanged to attached listeners.

fireRemoveFilterItem

Fires event removeFilterItem to attached listeners.

fireUpdateFilterItem

Fires event updateFilterItem to attached listeners.

getConditions

Returns the array of conditions.

getContainerQuery

Gets current value of property containerQuery.

Defines if the mediaQuery or a ContainerResize is used for layout update. If the ConditionPanel is used in a dialog, the property must be set to true.

Default value is false.

getEnableEmptyOperations

Gets current value of property enableEmptyOperations.

Should empty operation be enabled for certain data types. This is also based on their nullable setting.

Default value is false.

getExcludeOperations

Getter for the exclude operations.

getFilterItems

Gets content of aggregation filterItems.

Defines filter items.

getIncludeOperations

Getter for the include operations.

getLayoutMode

Gets current value of property layoutMode.

Can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or"Phone" you can set a fixed layout.

getMaxExcludes

Gets current value of property maxExcludes.

Defines the maximum number of exclude filters.

Default value is '-1'.

getMaxIncludes

Gets current value of property maxIncludes.

Defines the maximum number of include filters.

Default value is '-1'.

getMessageStrip

Gets content of aggregation messageStrip.

Defines an optional message strip to be displayed in the content area

sap.m.P13nFilterPanel.getMetadata

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

indexOfFilterItem

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

insertFilterItem

Inserts a filterItem into the aggregation filterItems.

removeAllFilterItems

Removes all the controls from the aggregation filterItems.

Additionally, it unregisters them from the hosting UIArea.

removeFilterItem

Removes a filterItem from the aggregation filterItems.

removeInvalidConditions

Removes all invalid conditions.

removeValidationErrors

Removes all errors and warnings states from of all filter conditions.

setConditions

Sets the array of conditions.

setContainerQuery

Sets a new value for property containerQuery.

Defines if the mediaQuery or a ContainerResize is used for layout update. If the ConditionPanel is used in a dialog, the property must be set to true.

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

Default value is false.

setEnableEmptyOperations

Sets a new value for property enableEmptyOperations.

Should empty operation be enabled for certain data types. This is also based on their nullable setting.

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

Default value is false.

setExcludeOperations

Setter for the supported exclude operations array.

setIncludeOperations

Setter for the supported Include operations array.

setLayoutMode

Sets a new value for property layoutMode.

Can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or"Phone" you can set a fixed layout.

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

setMaxExcludes

Sets a new value for property maxExcludes.

Defines the maximum number of exclude filters.

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

Default value is '-1'.

setMaxIncludes

Sets a new value for property maxIncludes.

Defines the maximum number of include filters.

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

Default value is '-1'.

setMessageStrip

Sets the aggregated messageStrip.

unbindFilterItems

Unbinds aggregation filterItems from model data.

validateConditions

Checks if the entered and modified conditions are correct, marks invalid fields in yellow (warning).

addFilterItem

Adds some filterItem to the aggregation filterItems.

Param Type DefaultValue Description
oFilterItem sap.m.P13nFilterItem

The filterItem to add; if empty, nothing is inserted

attachAddFilterItem

Attaches event handler fnFunction to the addFilterItem event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been added.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.P13nFilterPanel itself

attachFilterItemChanged

Attaches event handler fnFunction to the filterItemChanged event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been changed. reason can be added, updated or removed.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.P13nFilterPanel itself

attachRemoveFilterItem

Attaches event handler fnFunction to the removeFilterItem event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been removed.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.P13nFilterPanel itself

attachUpdateFilterItem

Attaches event handler fnFunction to the updateFilterItem event of this sap.m.P13nFilterPanel.

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

Event raised if a filter item has been updated.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.m.P13nFilterPanel itself

bindFilterItems

Binds aggregation filterItems to model data.

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

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

The binding information

destroyFilterItems

Destroys all the filterItems in the aggregation filterItems.

destroyMessageStrip

Destroys the messageStrip in the aggregation messageStrip.

detachAddFilterItem

Detaches event handler fnFunction from the addFilterItem event of this sap.m.P13nFilterPanel.

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

detachFilterItemChanged

Detaches event handler fnFunction from the filterItemChanged event of this sap.m.P13nFilterPanel.

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

detachRemoveFilterItem

Detaches event handler fnFunction from the removeFilterItem event of this sap.m.P13nFilterPanel.

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

detachUpdateFilterItem

Detaches event handler fnFunction from the updateFilterItem event of this sap.m.P13nFilterPanel.

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

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.m.P13nFilterPanel.extend

Creates a new subclass of class sap.m.P13nFilterPanel with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.P13nPanel.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

fireAddFilterItem

Fires event addFilterItem to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFilterItemChanged

Fires event filterItemChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

reason string

reason for the changeFilterItem event. Value can be added, updated or removed.

key string

key of the changed filterItem

index int

index of the changed filterItem

itemData object

JSON object of the changed filterItem instance (in case of reason=="removed" the itemData parameter does not exist)

fireRemoveFilterItem

Fires event removeFilterItem to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireUpdateFilterItem

Fires event updateFilterItem to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getConditions

Returns the array of conditions.

getContainerQuery

Gets current value of property containerQuery.

Defines if the mediaQuery or a ContainerResize is used for layout update. If the ConditionPanel is used in a dialog, the property must be set to true.

Default value is false.

getEnableEmptyOperations

Gets current value of property enableEmptyOperations.

Should empty operation be enabled for certain data types. This is also based on their nullable setting.

Default value is false.

getExcludeOperations

Getter for the exclude operations.

Param Type DefaultValue Description
sType string

the type for which the operations are defined

getFilterItems

Gets content of aggregation filterItems.

Defines filter items.

getIncludeOperations

Getter for the include operations.

Param Type DefaultValue Description
sType string

for which the operations are defined

getLayoutMode

Gets current value of property layoutMode.

Can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or"Phone" you can set a fixed layout.

getMaxExcludes

Gets current value of property maxExcludes.

Defines the maximum number of exclude filters.

Default value is '-1'.

getMaxIncludes

Gets current value of property maxIncludes.

Defines the maximum number of include filters.

Default value is '-1'.

getMessageStrip

Gets content of aggregation messageStrip.

Defines an optional message strip to be displayed in the content area

sap.m.P13nFilterPanel.getMetadata

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

indexOfFilterItem

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

Param Type DefaultValue Description
oFilterItem sap.m.P13nFilterItem

The filterItem whose index is looked for

insertFilterItem

Inserts a filterItem into the aggregation filterItems.

Param Type DefaultValue Description
oFilterItem sap.m.P13nFilterItem

The filterItem to insert; if empty, nothing is inserted

iIndex int

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

removeAllFilterItems

Removes all the controls from the aggregation filterItems.

Additionally, it unregisters them from the hosting UIArea.

removeFilterItem

Removes a filterItem from the aggregation filterItems.

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

The filterItem to remove or its index or id

removeInvalidConditions

Removes all invalid conditions.

removeValidationErrors

Removes all errors and warnings states from of all filter conditions.

setConditions

Sets the array of conditions.

Param Type DefaultValue Description
aConditions object[]

the complete list of conditions

setContainerQuery

Sets a new value for property containerQuery.

Defines if the mediaQuery or a ContainerResize is used for layout update. If the ConditionPanel is used in a dialog, the property must be set to true.

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

New value for property containerQuery

setEnableEmptyOperations

Sets a new value for property enableEmptyOperations.

Should empty operation be enabled for certain data types. This is also based on their nullable setting.

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

New value for property enableEmptyOperations

setExcludeOperations

Setter for the supported exclude operations array.

Param Type DefaultValue Description
aOperation sap.m.P13nConditionOperation[]

array of operations [sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.EQ]

sType string

the type for which the operations are defined

setIncludeOperations

Setter for the supported Include operations array.

Param Type DefaultValue Description
aOperation sap.m.P13nConditionOperation[]

array of operations [sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.EQ]

sType string

the type for which the operations are defined

setLayoutMode

Sets a new value for property layoutMode.

Can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or"Phone" you can set a fixed layout.

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

Param Type DefaultValue Description
sLayoutMode string

New value for property layoutMode

setMaxExcludes

Sets a new value for property maxExcludes.

Defines the maximum number of exclude filters.

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

Default value is '-1'.

Param Type DefaultValue Description
sMaxExcludes string '-1'

New value for property maxExcludes

setMaxIncludes

Sets a new value for property maxIncludes.

Defines the maximum number of include filters.

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

Default value is '-1'.

Param Type DefaultValue Description
sMaxIncludes string '-1'

New value for property maxIncludes

setMessageStrip

Sets the aggregated messageStrip.

Param Type DefaultValue Description
oMessageStrip sap.m.MessageStrip

The messageStrip to set

unbindFilterItems

Unbinds aggregation filterItems from model data.

validateConditions

Checks if the entered and modified conditions are correct, marks invalid fields in yellow (warning).