class sap.ui.comp.filterbar.FilterItem

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

Represents a filter belonging to the basic group.


Constructor

Constructor for a new FilterBar/FilterItem.

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.FilterItem(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
controlTooltip string

Tooltip for the filter'c control.

Since: 1.52.0.

Visibility: public
entitySetName string

EntitySet name to which the filter belongs

Since: 1.58.0.

Visibility: public
entityTypeName string

EntityType name to which the filter belongs

Since: 1.58.0.

Visibility: public
hiddenFilter boolean false

A hidden filter will never be visible in the filter bar control

Since: 1.44.0.

Visibility: public
label string

Label of the filter.

Visibility: public
labelTooltip string

Tooltip for the filter.

Visibility: public
mandatory boolean false

Mandatory flag.

Visibility: public
name string

Name of the filter. This is an identifier for the filter and has to be unique.

Visibility: public
partOfCurrentVariant boolean true

Determines if a filter is part of the currently selected variant.
Note: This property can also be changed using the visibleInFilterBar property and by user interaction in the Select Filters dialog or the variant handling.

Since: 1.26.1.

Visibility: public
visible boolean true

Visibility state of the filter.

Visibility: public
visibleInFilterBar boolean true

Controls the visibility of a filter item in the filter bar.

Since: 1.26.1.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
control 0..1 sap.ui.core.Control

The control of the filter.


Events Overview

Event Description
change

This event is fired when one of the properties is changed.

change

This event is fired when one of the properties is changed.

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

Name of the changed property


Methods Overview

Method Description
attachChange

Attaches event handler fnFunction to the change event of this sap.ui.comp.filterbar.FilterItem.

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

This event is fired when one of the properties is changed.

destroy

Destroys this element.

destroyControl

Destroys the control in the aggregation control.

detachChange

Detaches event handler fnFunction from the change event of this sap.ui.comp.filterbar.FilterItem.

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

sap.ui.comp.filterbar.FilterItem.extend

Creates a new subclass of class sap.ui.comp.filterbar.FilterItem with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.ui.core.Element.extend.

fireChange

Fires event change to attached listeners.

getControl

Always returns the initially added control.

getControlTooltip

Gets current value of property controlTooltip.

Tooltip for the filter'c control.

getEntitySetName

Gets current value of property entitySetName.

EntitySet name to which the filter belongs

getEntityTypeName

Gets current value of property entityTypeName.

EntityType name to which the filter belongs

getHiddenFilter

Gets current value of property hiddenFilter.

A hidden filter will never be visible in the filter bar control

Default value is false.

getLabel

Gets current value of property label.

Label of the filter.

getLabelTooltip

Gets current value of property labelTooltip.

Tooltip for the filter.

getMandatory

Gets current value of property mandatory.

Mandatory flag.

Default value is false.

sap.ui.comp.filterbar.FilterItem.getMetadata

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

getName

Gets current value of property name.

Name of the filter. This is an identifier for the filter and has to be unique.

getPartOfCurrentVariant

Gets current value of property partOfCurrentVariant.

Determines if a filter is part of the currently selected variant.
Note: This property can also be changed using the visibleInFilterBar property and by user interaction in the Select Filters dialog or the variant handling.

Default value is true.

Since 1.87 Will be internally treated as if always set to <code>true<code>
getVisible

Gets current value of property visible.

Visibility state of the filter.

Default value is true.

getVisibleInFilterBar

Gets current value of property visibleInFilterBar.

Controls the visibility of a filter item in the filter bar.

Default value is true.

init

Initializes the filter item.

setControl

Sets the corresponding control. The control may not be overwritten by the application, once the filter item is assigned to the FilterBar.

setControlTooltip

Sets a new value for property controlTooltip.

Tooltip for the filter'c control.

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

setEntitySetName

Sets a new value for property entitySetName.

EntitySet name to which the filter belongs

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

setEntityTypeName

Sets a new value for property entityTypeName.

EntityType name to which the filter belongs

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

setHiddenFilter

Sets a new value for property hiddenFilter.

A hidden filter will never be visible in the filter bar control

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

Default value is false.

setLabel

Setter for label.

setLabelTooltip

Setter for tooltip.

setMandatory

Setter for mandatory flag.

setName

Sets a new value for property name.

Name of the filter. This is an identifier for the filter and has to be unique.

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

setPartOfCurrentVariant

Setter for partOfCurrentVariant in filter bar.

Since 1.89 This property is treated as always set to <codeYtrue</code>.
setVisible

Setter for visible property.

setVisibleInFilterBar

Setter for visible in filter bar.

attachChange

Attaches event handler fnFunction to the change event of this sap.ui.comp.filterbar.FilterItem.

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

This event is fired when one of the properties is changed.

Param Type DefaultValue Description
oData object

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

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

The function to be called when the event occurs

oListener object

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

destroy

Destroys this element.

destroyControl

Destroys the control in the aggregation control.

detachChange

Detaches event handler fnFunction from the change event of this sap.ui.comp.filterbar.FilterItem.

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

Creates a new subclass of class sap.ui.comp.filterbar.FilterItem with name sClassName and enriches it with the information contained in oClassInfo.

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

fireChange

Fires event change to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

propertyName string

Name of the changed property

getControl

Always returns the initially added control.

getControlTooltip

Gets current value of property controlTooltip.

Tooltip for the filter'c control.

getEntitySetName

Gets current value of property entitySetName.

EntitySet name to which the filter belongs

getEntityTypeName

Gets current value of property entityTypeName.

EntityType name to which the filter belongs

getHiddenFilter

Gets current value of property hiddenFilter.

A hidden filter will never be visible in the filter bar control

Default value is false.

getLabel

Gets current value of property label.

Label of the filter.

getLabelTooltip

Gets current value of property labelTooltip.

Tooltip for the filter.

getMandatory

Gets current value of property mandatory.

Mandatory flag.

Default value is false.

sap.ui.comp.filterbar.FilterItem.getMetadata

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

getName

Gets current value of property name.

Name of the filter. This is an identifier for the filter and has to be unique.

getPartOfCurrentVariant

Gets current value of property partOfCurrentVariant.

Determines if a filter is part of the currently selected variant.
Note: This property can also be changed using the visibleInFilterBar property and by user interaction in the Select Filters dialog or the variant handling.

Default value is true.

Since 1.87 Will be internally treated as if always set to <code>true<code>

getVisible

Gets current value of property visible.

Visibility state of the filter.

Default value is true.

getVisibleInFilterBar

Gets current value of property visibleInFilterBar.

Controls the visibility of a filter item in the filter bar.

Default value is true.

init

Initializes the filter item.

setControl

Sets the corresponding control. The control may not be overwritten by the application, once the filter item is assigned to the FilterBar.

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

associated with the filter.

setControlTooltip

Sets a new value for property controlTooltip.

Tooltip for the filter'c control.

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

Param Type DefaultValue Description
sControlTooltip string

New value for property controlTooltip

setEntitySetName

Sets a new value for property entitySetName.

EntitySet name to which the filter belongs

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

Param Type DefaultValue Description
sEntitySetName string

New value for property entitySetName

setEntityTypeName

Sets a new value for property entityTypeName.

EntityType name to which the filter belongs

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

Param Type DefaultValue Description
sEntityTypeName string

New value for property entityTypeName

setHiddenFilter

Sets a new value for property hiddenFilter.

A hidden filter will never be visible in the filter bar control

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

New value for property hiddenFilter

setLabel

Setter for label.

Param Type DefaultValue Description
sValue string

Label text

setLabelTooltip

Setter for tooltip.

Param Type DefaultValue Description
sText string

Tooltip text

setMandatory

Setter for mandatory flag.

Param Type DefaultValue Description
bValue string

Mandatory state

setName

Sets a new value for property name.

Name of the filter. This is an identifier for the filter and has to be unique.

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

Param Type DefaultValue Description
sName string

New value for property name

setPartOfCurrentVariant

Setter for partOfCurrentVariant in filter bar.

Since 1.89 This property is treated as always set to <codeYtrue</code>.
Param Type DefaultValue Description
bVisible boolean

State of visibility in filter bar

setVisible

Setter for visible property.

Param Type DefaultValue Description
bVisible boolean

State of visibility

setVisibleInFilterBar

Setter for visible in filter bar.

Param Type DefaultValue Description
bVisible boolean

State of visibility in filter bar