Class sap.ui.comp.smartfilterbar.ControlConfigurationModule: sap/ui/comp/smartfilterbar/ControlConfiguration

extends Element

ControlConfiguration can be used to add additional configuration for filter fields in the SmartFilterBar control, in order to overwrite the default settings from the OData metadata. For instance, it is possible to change the label, index or control type of a filter field.

Constructor Summary
new sap.ui.comp.smartfilterbar.ControlConfiguration(sId?, mSettings?)Constructor for a new smartfilterbar/ControlConfiguration.
Event Summary
change(oControlEvent)Fired when the value of a property, for example isVisible, has changed.
Method Summary
sap.ui.comp.smartfilterbar.ControlConfiguration.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.smartfilterbar.ControlConfiguration with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.smartfilterbar.ControlConfiguration.getMetadata()Returns a metadata object for class sap.ui.comp.smartfilterbar.ControlConfiguration.
addDefaultFilterValue(oDefaultFilterValue)Adds some defaultFilterValue to the aggregation defaultFilterValues.
attachChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the change event of this sap.ui.comp.smartfilterbar.ControlConfiguration.
destroyCustomControl()Destroys the customControl in the aggregation customControl.
destroyDefaultFilterValues()Destroys all the defaultFilterValues in the aggregation defaultFilterValues.
detachChange(fnFunction, oListener)Detaches event handler fnFunction from the change event of this sap.ui.comp.smartfilterbar.ControlConfiguration.
fireChange(mArguments?)Fires event change to attached listeners.
getConditionType()Gets current value of property conditionType.
getControlType()Gets current value of property controlType.
getCustomControl()Gets content of aggregation customControl.
getDefaultFilterValues()Gets content of aggregation defaultFilterValues.
getDisplayBehaviour()Gets current value of property displayBehaviour.
getFilterType()Gets current value of property filterType.
getGroupId()Gets current value of property groupId.
getHasTypeAhead()Gets current value of property hasTypeAhead.
getHasValueHelpDialog()Gets current value of property hasValueHelpDialog.
getIndex()Gets current value of property index.
getKey()Gets current value of property key.
getLabel()Gets current value of property label.
getMandatory()Gets current value of property mandatory.
getPreventInitialDataFetchInValueHelpDialog()Gets current value of property preventInitialDataFetchInValueHelpDialog.
getVisible()Gets current value of property visible.
getVisibleInAdvancedArea()Gets current value of property visibleInAdvancedArea.
getWidth()Gets current value of property width.
indexOfDefaultFilterValue(oDefaultFilterValue)Checks for the provided sap.ui.comp.smartfilterbar.SelectOption in the aggregation defaultFilterValues.
insertDefaultFilterValue(oDefaultFilterValue, iIndex)Inserts a defaultFilterValue into the aggregation defaultFilterValues.
removeAllDefaultFilterValues()Removes all the controls from the aggregation defaultFilterValues.
removeDefaultFilterValue(vDefaultFilterValue)Removes a defaultFilterValue from the aggregation defaultFilterValues.
setConditionType(oConditionType)Sets a new value for property conditionType.
setControlType(sControlType)Sets a new value for property controlType.
setCustomControl(oCustomControl)Sets the aggregated customControl.
setDisplayBehaviour(sDisplayBehaviour)Sets a new value for property displayBehaviour.
setFilterType(sFilterType)Sets a new value for property filterType.
setGroupId(sGroupId)Sets a new value for property groupId.
setHasTypeAhead(bHasTypeAhead)Sets a new value for property hasTypeAhead.
setHasValueHelpDialog(bHasValueHelpDialog)Sets a new value for property hasValueHelpDialog.
setIndex(iIndex)Sets a new value for property index.
setKey(sKey)Sets a new value for property key.
setLabel(sLabel)Sets a new value for property label.
setMandatory(sMandatory)Sets a new value for property mandatory.
setPreventInitialDataFetchInValueHelpDialog(bPreventInitialDataFetchInValueHelpDialog)Sets a new value for property preventInitialDataFetchInValueHelpDialog.
setVisible(bVisible)Sets a new value for property visible.
setVisibleInAdvancedArea(bVisibleInAdvancedArea)Sets a new value for property visibleInAdvancedArea.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.ui.comp.smartfilterbar.ControlConfiguration(sId?, mSettings?)
Constructor for a new smartfilterbar/ControlConfiguration.

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)
Fired when the value of a property, for example isVisible, has 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.smartfilterbar.ControlConfiguration.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.smartfilterbar.ControlConfiguration 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.smartfilterbar.ControlConfiguration.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.smartfilterbar.ControlConfiguration.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addDefaultFilterValue(oDefaultFilterValue): sap.ui.comp.smartfilterbar.ControlConfiguration
Adds some defaultFilterValue to the aggregation defaultFilterValues.
Parameters:
{sap.ui.comp.smartfilterbar.SelectOption}oDefaultFilterValue the defaultFilterValue to add; if empty, nothing is inserted
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
attachChange(oData?, fnFunction, oListener?): sap.ui.comp.smartfilterbar.ControlConfiguration
Attaches event handler fnFunction to the change event of this sap.ui.comp.smartfilterbar.ControlConfiguration.

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.smartfilterbar.ControlConfiguration itself.

Fired when the value of a property, for example isVisible, has 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.smartfilterbar.ControlConfiguration itself
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Destroys the customControl in the aggregation customControl.
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Destroys all the defaultFilterValues in the aggregation defaultFilterValues.
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
detachChange(fnFunction, oListener): sap.ui.comp.smartfilterbar.ControlConfiguration
Detaches event handler fnFunction from the change event of this sap.ui.comp.smartfilterbar.ControlConfiguration.

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.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
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.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
getConditionType(): any
Gets current value of property conditionType.

The condition Type class name to use for this filter item Implemantation should derive from sap.ui.comp.config.condition.Type

Returns:
{any} Value of property conditionType
getControlType(): string
Gets current value of property controlType.

The SmartFilterBar calculates which kind of control will be used for a filter fields based on multiple OData Attributes and annotations. Using this property it is possible to overwrite the OData metadata. Possible values can be found here: sap.ui.comp.smartfilterbar.ControlConfiguration.CONTROLTYPE

Default value is auto.

Returns:
{string} Value of property controlType
getCustomControl(): sap.ui.core.Control
Gets content of aggregation customControl.

If a custom control is specified, the Smart Filter Bar will not create a control but use the custom control. Additional services like TypeAhead have to implemented manually.

Returns:
{sap.ui.core.Control}
getDefaultFilterValues(): sap.ui.comp.smartfilterbar.SelectOption[]
Gets content of aggregation defaultFilterValues.

Default value for a filter field.

Returns:
{sap.ui.comp.smartfilterbar.SelectOption[]}
getDisplayBehaviour(): string
Gets current value of property displayBehaviour.

The displayBehaviour specifies how the content should be displayed on certain controls. Ex: DescriptionOnly for Combobox (DropDown text) , Description and ID for MultiInput (token text) Possible values can be found here: sap.ui.comp.smartfilterbar.ControlConfiguration.DISPLAYBEHAVIOUR

Default value is auto.

Returns:
{string} Value of property displayBehaviour
getFilterType(): string
Gets current value of property filterType.

The filter type specifies whether the filter fields is e.g. type single value, multi-value,or interval. The filter type is being calculated by the martFilterBar based on the OData metadata. Using this property the filter type can be configured manually. Possible value scan be found here: sap.ui.comp.smartfilterbar.ControlConfiguration.FILTERTYPE

Default value is auto.

Returns:
{string} Value of property filterType
getGroupId(): string
Gets current value of property groupId.

The groupId can be used to move a field from one group to another. The groupId corresponds to the EntityName from the OData metadata. It is also possible to move a field from the advanced area to the basic area by specifying the groupId _BASIC.

Returns:
{string} Value of property groupId
getHasTypeAhead(): boolean
Gets current value of property hasTypeAhead.

Property can be used to enable the TypeAhead service. TypeAhead does not work with all controls, e.g it does not work for DrodDownListbox

Default value is true.

Returns:
{boolean} Value of property hasTypeAhead
getHasValueHelpDialog(): boolean
Gets current value of property hasValueHelpDialog.

Specifies whether a value help dialog is available or not.

Default value is true.

Returns:
{boolean} Value of property hasValueHelpDialog
getIndex(): int
Gets current value of property index.

The zero based index can be used to specify the initial order of fields (without any variants).

Default value is -1.

Returns:
{int} Value of property index
getKey(): string
Gets current value of property key.

The key property corresponds to the field name from the OData service $metadata document.

Returns:
{string} Value of property key
getLabel(): string
Gets current value of property label.

Using this property it is possible to overwrite the label of a filter field in the SmartFilterBar.

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

Property can be used to overwrite the mandatory state of a filter field. Possible values: sap.ui.comp.smartfilterbar.ControlConfiguration.MANDATORY Property can only be set during initialisation. Changes at runtime will be ignored.

Default value is auto.

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

In case there are value help annotations for this filter field, it is possible to specify whether the table in the value help dialog for this field will be filled initially. The default value is flase, which menas the table will be filled as the data fetch is not being prevented.

Default value is true.

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

Using this flag it is possible to hide fields from the OData metadata.

Default value is true.

Returns:
{boolean} Value of property visible
getVisibleInAdvancedArea(): boolean
Gets current value of property visibleInAdvancedArea.

If set to true this field will be added to the advanced area (aka. Dynamic Selection) by default.

Default value is false.

Returns:
{boolean} Value of property visibleInAdvancedArea
getWidth(): string
Gets current value of property width.

The width of the filter field in a CSS compatible format. The width can be set only once during initialisation. Changes at runtime will not be reflected. The width will not be applied to custom controls.

Returns:
{string} Value of property width
indexOfDefaultFilterValue(oDefaultFilterValue): int
Checks for the provided sap.ui.comp.smartfilterbar.SelectOption in the aggregation defaultFilterValues. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.comp.smartfilterbar.SelectOption}oDefaultFilterValue The defaultFilterValue whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertDefaultFilterValue(oDefaultFilterValue, iIndex): sap.ui.comp.smartfilterbar.ControlConfiguration
Inserts a defaultFilterValue into the aggregation defaultFilterValues.
Parameters:
{sap.ui.comp.smartfilterbar.SelectOption}oDefaultFilterValue the defaultFilterValue to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the defaultFilterValue should be inserted at; for a negative value of iIndex, the defaultFilterValue is inserted at position 0; for a value greater than the current size of the aggregation, the defaultFilterValue is inserted at the last position
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
removeAllDefaultFilterValues(): sap.ui.comp.smartfilterbar.SelectOption[]
Removes all the controls from the aggregation defaultFilterValues.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.comp.smartfilterbar.SelectOption[]} An array of the removed elements (might be empty)
removeDefaultFilterValue(vDefaultFilterValue): sap.ui.comp.smartfilterbar.SelectOption
Removes a defaultFilterValue from the aggregation defaultFilterValues.
Parameters:
{int|string|sap.ui.comp.smartfilterbar.SelectOption}vDefaultFilterValue The defaultFilterValueto remove or its index or id
Returns:
{sap.ui.comp.smartfilterbar.SelectOption} The removed defaultFilterValue or null
setConditionType(oConditionType): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets a new value for property conditionType.

The condition Type class name to use for this filter item Implemantation should derive from sap.ui.comp.config.condition.Type

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

Parameters:
{any}oConditionType New value for property conditionType
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property controlType.

The SmartFilterBar calculates which kind of control will be used for a filter fields based on multiple OData Attributes and annotations. Using this property it is possible to overwrite the OData metadata. Possible values can be found here: sap.ui.comp.smartfilterbar.ControlConfiguration.CONTROLTYPE

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

Default value is auto.

Parameters:
{string}sControlType New value for property controlType
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
setCustomControl(oCustomControl): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets the aggregated customControl.
Parameters:
{sap.ui.core.Control}oCustomControl The customControl to set
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
setDisplayBehaviour(sDisplayBehaviour): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets a new value for property displayBehaviour.

The displayBehaviour specifies how the content should be displayed on certain controls. Ex: DescriptionOnly for Combobox (DropDown text) , Description and ID for MultiInput (token text) Possible values can be found here: sap.ui.comp.smartfilterbar.ControlConfiguration.DISPLAYBEHAVIOUR

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

Default value is auto.

Parameters:
{string}sDisplayBehaviour New value for property displayBehaviour
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property filterType.

The filter type specifies whether the filter fields is e.g. type single value, multi-value,or interval. The filter type is being calculated by the martFilterBar based on the OData metadata. Using this property the filter type can be configured manually. Possible value scan be found here: sap.ui.comp.smartfilterbar.ControlConfiguration.FILTERTYPE

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

Default value is auto.

Parameters:
{string}sFilterType New value for property filterType
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property groupId.

The groupId can be used to move a field from one group to another. The groupId corresponds to the EntityName from the OData metadata. It is also possible to move a field from the advanced area to the basic area by specifying the groupId _BASIC.

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

Parameters:
{string}sGroupId New value for property groupId
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
setHasTypeAhead(bHasTypeAhead): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets a new value for property hasTypeAhead.

Property can be used to enable the TypeAhead service. TypeAhead does not work with all controls, e.g it does not work for DrodDownListbox

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

Default value is true.

Parameters:
{boolean}bHasTypeAhead New value for property hasTypeAhead
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
setHasValueHelpDialog(bHasValueHelpDialog): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets a new value for property hasValueHelpDialog.

Specifies whether a value help dialog is available or not.

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

Default value is true.

Parameters:
{boolean}bHasValueHelpDialog New value for property hasValueHelpDialog
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property index.

The zero based index can be used to specify the initial order of fields (without any variants).

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

Default value is -1.

Parameters:
{int}iIndex New value for property index
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property key.

The key property corresponds to the field name from the OData service $metadata document.

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

Parameters:
{string}sKey New value for property key
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property label.

Using this property it is possible to overwrite the label of a filter field in the SmartFilterBar.

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

Parameters:
{string}sLabel New value for property label
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property mandatory.

Property can be used to overwrite the mandatory state of a filter field. Possible values: sap.ui.comp.smartfilterbar.ControlConfiguration.MANDATORY Property can only be set during initialisation. Changes at runtime will be ignored.

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

Default value is auto.

Parameters:
{string}sMandatory New value for property mandatory
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
setPreventInitialDataFetchInValueHelpDialog(bPreventInitialDataFetchInValueHelpDialog): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets a new value for property preventInitialDataFetchInValueHelpDialog.

In case there are value help annotations for this filter field, it is possible to specify whether the table in the value help dialog for this field will be filled initially. The default value is flase, which menas the table will be filled as the data fetch is not being prevented.

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

Default value is true.

Parameters:
{boolean}bPreventInitialDataFetchInValueHelpDialog New value for property preventInitialDataFetchInValueHelpDialog
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property visible.

Using this flag it is possible to hide fields from the OData metadata.

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

Default value is true.

Parameters:
{boolean}bVisible New value for property visible
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
setVisibleInAdvancedArea(bVisibleInAdvancedArea): sap.ui.comp.smartfilterbar.ControlConfiguration
Sets a new value for property visibleInAdvancedArea.

If set to true this field will be added to the advanced area (aka. Dynamic Selection) by default.

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

Default value is false.

Parameters:
{boolean}bVisibleInAdvancedArea New value for property visibleInAdvancedArea
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining
Sets a new value for property width.

The width of the filter field in a CSS compatible format. The width can be set only once during initialisation. Changes at runtime will not be reflected. The width will not be applied to custom controls.

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

Parameters:
{string}sWidth New value for property width
Returns:
{sap.ui.comp.smartfilterbar.ControlConfiguration} Reference to this in order to allow method chaining