Class sap.ui.comp.smartfilterbar.ControlConfigurationModule: sap/ui/comp/smartfilterbar/ControlConfiguration
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.
sClassName
and enriches it with the information contained in oClassInfo
.defaultFilterValues
.fnFunction
to the change
event of this sap.ui.comp.smartfilterbar.ControlConfiguration
.defaultFilterValues
.fnFunction
from the change
event of this sap.ui.comp.smartfilterbar.ControlConfiguration
.preventInitialDataFetchInValueHelpDialog
.sap.ui.comp.smartfilterbar.SelectOption
in the aggregation defaultFilterValues
.defaultFilterValues
.defaultFilterValues
.preventInitialDataFetchInValueHelpDialog
.visibleInAdvancedArea
. 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:
- Properties
- key : string
- groupId : string
- label : string
- visible : boolean (default: true)
- hasValueHelpDialog : boolean (default: true)
- controlType : string (default: auto)
- filterType : string (default: auto)
- index : int (default: -1)
- hasTypeAhead : boolean (default: true)
- mandatory : string (default: auto)
- width : string
- visibleInAdvancedArea : boolean (default: false)
- preventInitialDataFetchInValueHelpDialog : boolean (default: true)
- displayBehaviour : string (default: auto)
- conditionType : any
- Aggregations
- defaultFilterValues : sap.ui.comp.smartfilterbar.SelectOption[]
- customControl : sap.ui.core.Control
- Events
- change : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.core.Element can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.propertyName | Name of the changed property |
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.
{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 |
{function} | Created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
defaultFilterValues
. {sap.ui.comp.smartfilterbar.SelectOption} | oDefaultFilterValue | the defaultFilterValue to add; if empty, nothing is inserted |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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.
{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 |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
customControl
. {sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
defaultFilterValues
. {sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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.
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
change
to attached listeners. Expects the following event parameters:
propertyName
of typestring
Name of the changed property
{Map} | mArguments? | The arguments to pass along with the event |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
conditionType
. The condition Type class name to use for this filter item Implemantation should derive from sap.ui.comp.config.condition.Type
{any} | Value of property conditionType |
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
.
{string} | Value of property controlType |
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.
{sap.ui.core.Control} |
defaultFilterValues
. Default value for a filter field.
{sap.ui.comp.smartfilterbar.SelectOption[]} |
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
.
{string} | Value of property displayBehaviour |
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
.
{string} | Value of property filterType |
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.
{string} | Value of property groupId |
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
.
{boolean} | Value of property hasTypeAhead |
hasValueHelpDialog
. Specifies whether a value help dialog is available or not.
Default value is true
.
{boolean} | Value of property hasValueHelpDialog |
index
. The zero based index can be used to specify the initial order of fields (without any variants).
Default value is -1
.
{int} | Value of property index |
key
. The key property corresponds to the field name from the OData service $metadata document.
{string} | Value of property key |
label
. Using this property it is possible to overwrite the label of a filter field in the SmartFilterBar.
{string} | Value of property label |
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
.
{string} | Value of property mandatory |
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
.
{boolean} | Value of property preventInitialDataFetchInValueHelpDialog |
visible
. Using this flag it is possible to hide fields from the OData metadata.
Default value is true
.
{boolean} | Value of property visible |
visibleInAdvancedArea
. If set to true this field will be added to the advanced area (aka. Dynamic Selection) by default.
Default value is false
.
{boolean} | Value of property visibleInAdvancedArea |
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.
{string} | Value of property width |
sap.ui.comp.smartfilterbar.SelectOption
in the aggregation defaultFilterValues
. and returns its index if found or -1 otherwise. {sap.ui.comp.smartfilterbar.SelectOption} | oDefaultFilterValue | The defaultFilterValue whose index is looked for |
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
defaultFilterValues
. {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 |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
defaultFilterValues
. Additionally, it unregisters them from the hosting UIArea.
{sap.ui.comp.smartfilterbar.SelectOption[]} | An array of the removed elements (might be empty) |
defaultFilterValues
. {int|string|sap.ui.comp.smartfilterbar.SelectOption} | vDefaultFilterValue | The defaultFilterValueto remove or its index or id |
{sap.ui.comp.smartfilterbar.SelectOption} | The removed defaultFilterValue or null |
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.
{any} | oConditionType | New value for property conditionType |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{string} | sControlType | New value for property controlType |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
customControl
. {sap.ui.core.Control} | oCustomControl | The customControl to set |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{string} | sDisplayBehaviour | New value for property displayBehaviour |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{string} | sFilterType | New value for property filterType |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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.
{string} | sGroupId | New value for property groupId |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{boolean} | bHasTypeAhead | New value for property hasTypeAhead |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{boolean} | bHasValueHelpDialog | New value for property hasValueHelpDialog |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{int} | iIndex | New value for property index |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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.
{string} | sKey | New value for property key |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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.
{string} | sLabel | New value for property label |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{string} | sMandatory | New value for property mandatory |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{boolean} | bPreventInitialDataFetchInValueHelpDialog | New value for property preventInitialDataFetchInValueHelpDialog |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{boolean} | bVisible | New value for property visible |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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
.
{boolean} | bVisibleInAdvancedArea | New value for property visibleInAdvancedArea |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |
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.
{string} | sWidth | New value for property width |
{sap.ui.comp.smartfilterbar.ControlConfiguration} | Reference to this in order to allow method chaining |