Represents a filter belonging to the basic group.
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 |
Name | Type | Default Value | Description |
---|---|---|---|
controlTooltip | string | Tooltip for the filter'c control. |
|
entitySetName | string | EntitySet name to which the filter belongs |
|
entityTypeName | string | EntityType name to which the filter belongs |
|
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. |
visible | boolean | true | Visibility state of the filter. Visibility: public |
visibleInFilterBar | boolean | true | Controls the visibility of a filter item in the filter bar. |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
control | 0..1 | sap.ui.core.Control |
The control of the filter. |
Method | Description |
---|---|
attachChange |
Attaches event handler When called, the context of the event handler (its 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 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
|
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 |
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 |
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. Default value is
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 |
getVisibleInFilterBar |
Gets current value of property visibleInFilterBar. Controls the visibility of a filter item in the filter bar. Default value is |
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 |
setEntitySetName |
Sets a new value for property entitySetName. EntitySet name to which the filter belongs When called with a value of |
setEntityTypeName |
Sets a new value for property entityTypeName. EntityType name to which the filter belongs When called with a value of |
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 Default value is |
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 |
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. |
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 |
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 |
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 |
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 |
Gets current value of property entitySetName.
EntitySet name to which the filter belongs
Gets current value of property entityTypeName.
EntityType name to which the filter belongs
Gets current value of property hiddenFilter.
A hidden filter will never be visible in the filter bar control
Default value is false
.
Returns a metadata object for class sap.ui.comp.filterbar.FilterItem.
Gets current value of property name.
Name of the filter. This is an identifier for the filter and has to be unique.
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
.
Gets current value of property visible.
Visibility state of the filter.
Default value is true
.
Gets current value of property visibleInFilterBar.
Controls the visibility of a filter item in the filter bar.
Default value is true
.
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. |
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 |
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 |
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 |
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 |
Setter for mandatory flag.
Param | Type | DefaultValue | Description |
---|---|---|---|
bValue | string |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sName | string |
New value for property |
Setter for partOfCurrentVariant in filter bar.
Param | Type | DefaultValue | Description |
---|---|---|---|
bVisible | boolean |
State of visibility in filter bar |