Class sap.ui.comp.filterbar.FilterItemModule: sap/ui/comp/filterbar/FilterItem

extends Element
known direct subclasses: FilterGroupItem

Represents a filter belonging to the basic group.

Constructor Summary
new sap.ui.comp.filterbar.FilterItem(sId?, mSettings?)Constructor for a new filterbar/FilterItem.
Event Summary
change(oControlEvent)This event is fired when one of the properties is changed.
Method Summary
sap.ui.comp.filterbar.FilterItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.filterbar.FilterItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.filterbar.FilterItem.getMetadata()Returns a metadata object for class sap.ui.comp.filterbar.FilterItem.
attachChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the change event of this sap.ui.comp.filterbar.FilterItem.
destroy()Destroys this element.
destroyControl()Destroys the control in the aggregation control.
detachChange(fnFunction, oListener)Detaches event handler fnFunction from the change event of this sap.ui.comp.filterbar.FilterItem.
fireChange(mArguments?)Fires event change to attached listeners.
getControl()Gets content of aggregation control.
getLabel()Gets current value of property label.
getLabelTooltip()Gets current value of property labelTooltip.
getMandatory()Gets current value of property mandatory.
getName()Gets current value of property name.
getPartOfCurrentVariant()Gets current value of property partOfCurrentVariant.
getVisible()Gets current value of property visible.
getVisibleInFilterBar()Gets current value of property visibleInFilterBar.
init()Initializes the filter item.
setControl(oControl)Sets the aggregated control.
setLabel(sValue)Setter for label.
setLabelTooltip(sText)Setter for tooltip.
setMandatory(bValue)Setter for mandatory flag.
setName(sName)Sets a new value for property name.
setPartOfCurrentVariant(bPartOfCurrentVariant)Sets a new value for property partOfCurrentVariant.
setVisible(bVisible)Setter for visible property.
setVisibleInFilterBar(bVisible)Setter for visible in filter bar.
Constructor Detail
new sap.ui.comp.filterbar.FilterItem(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Event Detail
change(oControlEvent)
This event is fired when one of the properties is changed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.propertyName Name of the changed property
Method Detail
sap.ui.comp.filterbar.FilterItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.comp.filterbar.FilterItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.filterbar.FilterItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachChange(oData?, fnFunction, oListener?): sap.ui.comp.filterbar.FilterItem
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.comp.filterbar.FilterItem itself
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
destroy()
Destroys this element.
Destroys the control in the aggregation control.
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
detachChange(fnFunction, oListener): sap.ui.comp.filterbar.FilterItem
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
fireChange(mArguments?): sap.ui.comp.filterbar.FilterItem
Fires event change to attached listeners.

Expects the following event parameters:

  • propertyName of type stringName of the changed property
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
getControl(): sap.ui.core.Control
Gets content of aggregation control.

The control of the filter.

Returns:
{sap.ui.core.Control}
getLabel(): string
Gets current value of property label.

Label of the filter.

Returns:
{string} Value of property label
getLabelTooltip(): string
Gets current value of property labelTooltip.

Tooltip for the filter.

Returns:
{string} Value of property labelTooltip
getMandatory(): boolean
Gets current value of property mandatory.

Mandatory flag.

Default value is false.

Returns:
{boolean} Value of property mandatory
getName(): string
Gets current value of property name.

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

Returns:
{string} Value of property name
getPartOfCurrentVariant(): boolean
Gets current value of property partOfCurrentVariant.

Determines if a filter is part of the currently selected variant. This property is ONLY used internally and must not be used by the filter bar consumers.

Default value is false.

Since:
1.26.1
Returns:
{boolean} Value of property partOfCurrentVariant
getVisible(): boolean
Gets current value of property visible.

Visibility state of the filter.

Default value is true.

Returns:
{boolean} Value of property visible
getVisibleInFilterBar(): boolean
Gets current value of property visibleInFilterBar.

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

Default value is true.

Since:
1.26.1
Returns:
{boolean} Value of property visibleInFilterBar
init()
Initializes the filter item.
setControl(oControl): sap.ui.comp.filterbar.FilterItem
Sets the aggregated control.
Parameters:
{sap.ui.core.Control}oControl The control to set
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
setLabel(sValue)
Setter for label.
Parameters:
{string}sValue Label text
setLabelTooltip(sText)
Setter for tooltip.
Parameters:
{string}sText Tooltip text
setMandatory(bValue)
Setter for mandatory flag.
Parameters:
{string}bValue Mandatory state
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.

Parameters:
{string}sName New value for property name
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
setPartOfCurrentVariant(bPartOfCurrentVariant): sap.ui.comp.filterbar.FilterItem
Sets a new value for property partOfCurrentVariant.

Determines if a filter is part of the currently selected variant. This property is ONLY used internally and must not be used by the filter bar consumers.

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

Default value is false.

Parameters:
{boolean}bPartOfCurrentVariant New value for property partOfCurrentVariant
Since:
1.26.1
Returns:
{sap.ui.comp.filterbar.FilterItem} Reference to this in order to allow method chaining
setVisible(bVisible)
Setter for visible property.
Parameters:
{boolean}bVisible State of visibility
setVisibleInFilterBar(bVisible)
Setter for visible in filter bar.
Parameters:
{boolean}bVisible State of visibility in filter bar
Since:
1.26.1