class sap.m.ViewSettingsFilterItem

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/ViewSettingsFilterItem
Application Component: CA-UI5-CTR

A ViewSettingsFilterItem control is used for modelling filter behaviour in the ViewSettingsDialog. It is derived from a core Item, but does not support the base class properties like textDirection and enabled. Setting these properties will not have any effects.


Constructor

Constructor for a new ViewSettingsFilterItem.

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.ViewSettingsFilterItem(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
multiSelect boolean true

If set to (true), multi selection will be allowed for the items aggregation.

Visibility: public

Borrowed Properties

Name Type Default Value Description
selected boolean false

Selected state of the item. If set to "true", the item will be displayed as selected in the view settings dialog.

Visibility: public

Aggregations

Default Aggregation:

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

Items with key and value that are logically grouped under this filter item. They are used to display filter details in the ViewSettingsDialog.


Events Overview

Event Description
filterDetailItemsAggregationChange

Let the outside world know that the filter detail aggregation was changed.

filterDetailItemsAggregationChange

Let the outside world know that the filter detail aggregation was changed.

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

Methods Overview

Method Description
addItem

Adds some item to the aggregation items.

attachFilterDetailItemsAggregationChange

Attaches event handler fnFunction to the filterDetailItemsAggregationChange event of this sap.m.ViewSettingsFilterItem.

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

Let the outside world know that the filter detail aggregation was changed.

bindItems

Binds aggregation items to model data.

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

destroyItems

Destroys all the items in the aggregation items.

detachFilterDetailItemsAggregationChange

Detaches event handler fnFunction from the filterDetailItemsAggregationChange event of this sap.m.ViewSettingsFilterItem.

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

sap.m.ViewSettingsFilterItem.extend

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

fireFilterDetailItemsAggregationChange

Fires event filterDetailItemsAggregationChange to attached listeners.

getItems

Gets content of aggregation items.

Items with key and value that are logically grouped under this filter item. They are used to display filter details in the ViewSettingsDialog.

sap.m.ViewSettingsFilterItem.getMetadata

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

getMultiSelect

Gets current value of property multiSelect.

If set to (true), multi selection will be allowed for the items aggregation.

Default value is true.

indexOfItem

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

insertItem

Inserts a item into the aggregation items.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

setMultiSelect

Sets a new value for property multiSelect.

If set to (true), multi selection will be allowed for the items aggregation.

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

Default value is true.

unbindItems

Unbinds aggregation items from model data.

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.m.ViewSettingsItem

The item to add; if empty, nothing is inserted

attachFilterDetailItemsAggregationChange

Attaches event handler fnFunction to the filterDetailItemsAggregationChange event of this sap.m.ViewSettingsFilterItem.

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

Let the outside world know that the filter detail aggregation was changed.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

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

bindItems

Binds aggregation items 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

destroyItems

Destroys all the items in the aggregation items.

detachFilterDetailItemsAggregationChange

Detaches event handler fnFunction from the filterDetailItemsAggregationChange event of this sap.m.ViewSettingsFilterItem.

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.ViewSettingsFilterItem.extend

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

fireFilterDetailItemsAggregationChange

Fires event filterDetailItemsAggregationChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getItems

Gets content of aggregation items.

Items with key and value that are logically grouped under this filter item. They are used to display filter details in the ViewSettingsDialog.

sap.m.ViewSettingsFilterItem.getMetadata

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

getMultiSelect

Gets current value of property multiSelect.

If set to (true), multi selection will be allowed for the items aggregation.

Default value is true.

indexOfItem

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

Param Type DefaultValue Description
oItem sap.m.ViewSettingsItem

The item whose index is looked for

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
oItem sap.m.ViewSettingsItem

The item to insert; if empty, nothing is inserted

iIndex int

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

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

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

The item to remove or its index or id

setMultiSelect

Sets a new value for property multiSelect.

If set to (true), multi selection will be allowed for the items aggregation.

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
bMultiSelect boolean true

New value for property multiSelect

unbindItems

Unbinds aggregation items from model data.