Class sap.m.P13nConditionPanelModule: sap/m/P13nConditionPanel

extends Control

The ConditionPanel Control will be used to implement the Sorting, Filtering and Grouping panel of the new Personalization dialog.
Experimental API:
since version 1.26 !!! THIS CONTROL IS ONLY FOR INTERNAL USE !!!

Since: 1.26.0.
Constructor Summary
new sap.m.P13nConditionPanel(sId?, mSettings?)Constructor for a new P13nConditionPanel.
Event Summary
dataChange(oControlEvent)Workaround for updating the binding
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.P13nConditionPanel.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.P13nConditionPanel with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.P13nConditionPanel.getMetadata()Returns a metadata object for class sap.m.P13nConditionPanel.
addCondition(oCondition)add a single condition.
addKeyField(oKeyField)add a single KeyField
addOperation(oOperation, sType)add a single operation
attachDataChange(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the dataChange event of this sap.m.P13nConditionPanel.
detachDataChange(fnFunction, oListener)Detaches event handler fnFunction from the dataChange event of this sap.m.P13nConditionPanel.
fireDataChange(mParameters?)Fires event dataChange to attached listeners.
getAlwaysShowAddIcon()Gets current value of property alwaysShowAddIcon.
getAutoAddNewRow()Gets current value of property autoAddNewRow.
getAutoReduceKeyFieldItems()Gets current value of property autoReduceKeyFieldItems.
getConditions()returns array of all defined conditions.
getContainerQuery()Gets current value of property containerQuery.
getDisableFirstRemoveIcon()Gets current value of property disableFirstRemoveIcon.
getDisplayFormat()Gets current value of property displayFormat.
getExclude()Gets current value of property exclude.
getKeyFields()getter for KeyFields array
getLayoutMode()Gets current value of property layoutMode.
getMaxConditions()Gets current value of property maxConditions.
getOperations(sType)returns the default array of operations
getShowLabel()Gets current value of property showLabel.
getUsePrevConditionSetting()Gets current value of property usePrevConditionSetting.
getValidationExecutor()Gets current value of property validationExecutor.
insertCondition(oCondition, index)insert a single condition.
removeAllConditions()remove all conditions.
removeAllKeyFields()removes all KeyFields
removeAllOperations(sType)remove all operations
removeCondition(vCondition)remove a single condition.
removeInvalidConditions()removes all invalid conditions.
removeValidationErrors()removes all errors/warning states from the value1/2 fields of all conditions.
setAutoAddNewRow(bAutoAddNewRow)Sets a new value for property autoAddNewRow.
setAutoReduceKeyFieldItems(bAutoReduceKeyFieldItems)Sets a new value for property autoReduceKeyFieldItems.
setConditions(aConditions)This method must be used to assign a list of conditions.
setDisableFirstRemoveIcon(bDisableFirstRemoveIcon)Sets a new value for property disableFirstRemoveIcon.
setDisplayFormat(sDisplayFormat)Sets a new value for property displayFormat.
setExclude(bExclude)Sets a new value for property exclude.
setKeyFields(aKeyFields)This method allows you to specify the KeyFields for the conditions.
setMaxConditions(sMaxConditions)Sets a new value for property maxConditions.
setOperations(aOperations, sType)setter for the supported operations which we show per condition row.
setShowLabel(bShowLabel)Sets a new value for property showLabel.
setUsePrevConditionSetting(bUsePrevConditionSetting)Sets a new value for property usePrevConditionSetting.
setValidationExecutor(oValidationExecutor)Sets a new value for property validationExecutor.
Constructor Detail
new sap.m.P13nConditionPanel(sId?, mSettings?)

Constructor for a new P13nConditionPanel.

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.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?initial settings for the new control
Event Detail
dataChange(oControlEvent)
Workaround for updating the binding
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Method Detail
sap.m.P13nConditionPanel.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.P13nConditionPanel 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.Control.extend.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.m.P13nConditionPanel.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.P13nConditionPanel.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addCondition(oCondition)
add a single condition.
Parameters:
objectoConditionthe new condition of type { "key": "007", "operation": sap.m.P13nConditionOperation.Ascending, "keyField": "keyFieldKey", "value1": "", "value2": ""};
addKeyField(oKeyField)
add a single KeyField
Parameters:
objectoKeyField{key: "CompanyCode", text: "ID"}
addOperation(oOperation, sType)
add a single operation
Parameters:
sap.m.P13nConditionOperationoOperation
stringsTypedefines the type for which this operations will be used.
attachDataChange(oData?, fnFunction, oListener?): sap.m.P13nConditionPanel

Attaches event handler fnFunction to the dataChange event of this sap.m.P13nConditionPanel.

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.m.P13nConditionPanel itself.

Workaround for updating the binding

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.m.P13nConditionPanel itself
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
detachDataChange(fnFunction, oListener): sap.m.P13nConditionPanel

Detaches event handler fnFunction from the dataChange event of this sap.m.P13nConditionPanel.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
fireDataChange(mParameters?): sap.m.P13nConditionPanel
Fires event dataChange to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
getAlwaysShowAddIcon(): boolean

Gets current value of property alwaysShowAddIcon.

makes the Add icon visible on each condition row. If is set to false the Add is only visible at the end and you can only append a new condition.

Default value is true.

Returns:
booleanValue of property alwaysShowAddIcon
getAutoAddNewRow(): boolean

Gets current value of property autoAddNewRow.

adds initial a new empty condition row

Default value is false.

Returns:
booleanValue of property autoAddNewRow
getAutoReduceKeyFieldItems(): boolean

Gets current value of property autoReduceKeyFieldItems.

KeyField value can only be selected once. When you set the property to true the ConditionPanel will automatically offers on the KeyField drop down only the keyFields which are not used. The default behavior is that in each keyField dropdown all keyfields are listed.

Default value is false.

Returns:
booleanValue of property autoReduceKeyFieldItems
getConditions(): object[]
returns array of all defined conditions.
Returns:
object[]array of Conditions
getContainerQuery(): boolean

Gets current value of property containerQuery.

defines if the mediaQuery or a ContainerResize will be used for layout update. When the P13nConditionPanel is used on a dialog the property should be set to true!

Default value is false.

Returns:
booleanValue of property containerQuery
getDisableFirstRemoveIcon(): boolean

Gets current value of property disableFirstRemoveIcon.

makes the remove icon on the first condition row disabled when only one condition exist.

Default value is false.

Returns:
booleanValue of property disableFirstRemoveIcon
getDisplayFormat(): string

Gets current value of property displayFormat.

This represents the displayFormat of the condition Values. With the value "UpperCase" the entered value of the condition will be converted to upperCase.

Returns:
stringValue of property displayFormat
getExclude(): boolean

Gets current value of property exclude.

exclude options for filter

Default value is false.

Returns:
booleanValue of property exclude
getKeyFields(): object[]
getter for KeyFields array
Returns:
object[]array of KeyFields [{key: "CompanyCode", text: "ID"}, {key:"CompanyName", text : "Name"}]
getLayoutMode(): string

Gets current value of property layoutMode.

can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or "Phone" you can set a fixed layout.

Returns:
stringValue of property layoutMode
getMaxConditions(): string

Gets current value of property maxConditions.

defines the max number of conditions on the ConditionPanel

Default value is -1.

Returns:
stringValue of property maxConditions
getOperations(sType): sap.m.P13nConditionOperation[]
returns the default array of operations
Parameters:
stringsTypedefines the type for which the operations should be returned.
Returns:
sap.m.P13nConditionOperation[]array of operations
getShowLabel(): boolean

Gets current value of property showLabel.

show additional labels in the condition

Default value is false.

Returns:
booleanValue of property showLabel
getUsePrevConditionSetting(): boolean

Gets current value of property usePrevConditionSetting.

new added condition use the settings from the previous condition as default.

Default value is true.

Returns:
booleanValue of property usePrevConditionSetting
getValidationExecutor(): object

Gets current value of property validationExecutor.

Calls the validation listener tbd...

Returns:
objectValue of property validationExecutor
insertCondition(oCondition, index)
insert a single condition.
Parameters:
objectoConditionthe new condition of type { "key": "007", "operation": sap.m.P13nConditionOperation.Ascending, "keyField": "keyFieldKey", "value1": "", "value2": ""};
intindexof the new condition
removeAllConditions()
remove all conditions.
removeAllKeyFields()
removes all KeyFields
removeAllOperations(sType)
remove all operations
Parameters:
stringsTypedefines the type for which all operations should be removed
removeCondition(vCondition)
remove a single condition.
Parameters:
objectvConditionis the condition which should be removed. can be either a string with the key of the condition of the condition object itself.
removeInvalidConditions()
removes all invalid conditions.
Since:
1.28.0
removeValidationErrors()
removes all errors/warning states from the value1/2 fields of all conditions.
Since:
1.28.0
setAutoAddNewRow(bAutoAddNewRow): sap.m.P13nConditionPanel

Sets a new value for property autoAddNewRow.

adds initial a new empty condition row

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

Default value is false.

Parameters:
booleanbAutoAddNewRowNew value for property autoAddNewRow
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setAutoReduceKeyFieldItems(bAutoReduceKeyFieldItems): sap.m.P13nConditionPanel

Sets a new value for property autoReduceKeyFieldItems.

KeyField value can only be selected once. When you set the property to true the ConditionPanel will automatically offers on the KeyField drop down only the keyFields which are not used. The default behavior is that in each keyField dropdown all keyfields are listed.

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

Default value is false.

Parameters:
booleanbAutoReduceKeyFieldItemsNew value for property autoReduceKeyFieldItems
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setConditions(aConditions)
This method must be used to assign a list of conditions.
Parameters:
object[]aConditionsarray of Conditions.
setDisableFirstRemoveIcon(bDisableFirstRemoveIcon): sap.m.P13nConditionPanel

Sets a new value for property disableFirstRemoveIcon.

makes the remove icon on the first condition row disabled when only one condition exist.

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

Default value is false.

Parameters:
booleanbDisableFirstRemoveIconNew value for property disableFirstRemoveIcon
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setDisplayFormat(sDisplayFormat): sap.m.P13nConditionPanel

Sets a new value for property displayFormat.

This represents the displayFormat of the condition Values. With the value "UpperCase" the entered value of the condition will be converted to upperCase.

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

Parameters:
stringsDisplayFormatNew value for property displayFormat
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setExclude(bExclude): sap.m.P13nConditionPanel

Sets a new value for property exclude.

exclude options for filter

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

Default value is false.

Parameters:
booleanbExcludeNew value for property exclude
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setKeyFields(aKeyFields)
This method allows you to specify the KeyFields for the conditions. You can set an array of object with Key and Text properties to define the keyfields.
Parameters:
arrayaKeyFieldsarray of KeyFields [{key: "CompanyCode", text: "ID"}, {key:"CompanyName", text : "Name"}]
setMaxConditions(sMaxConditions): sap.m.P13nConditionPanel

Sets a new value for property maxConditions.

defines the max number of conditions on the ConditionPanel

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

Default value is -1.

Parameters:
stringsMaxConditionsNew value for property maxConditions
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setOperations(aOperations, sType)
setter for the supported operations which we show per condition row. This array of "default" operations will only be used when we do not have on the keyfield itself some specific operations and a keyfield is of not of type date or numeric.
Parameters:
sap.m.P13nConditionOperation[]aOperationsarray of operations [sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.EQ]
stringsTypedefines the type for which this operations will be used. is sType is not defined the operations will be used as default operations.
setShowLabel(bShowLabel): sap.m.P13nConditionPanel

Sets a new value for property showLabel.

show additional labels in the condition

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

Default value is false.

Parameters:
booleanbShowLabelNew value for property showLabel
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setUsePrevConditionSetting(bUsePrevConditionSetting): sap.m.P13nConditionPanel

Sets a new value for property usePrevConditionSetting.

new added condition use the settings from the previous condition as default.

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

Default value is true.

Parameters:
booleanbUsePrevConditionSettingNew value for property usePrevConditionSetting
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining
setValidationExecutor(oValidationExecutor): sap.m.P13nConditionPanel

Sets a new value for property validationExecutor.

Calls the validation listener tbd...

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

Parameters:
objectoValidationExecutorNew value for property validationExecutor
Returns:
sap.m.P13nConditionPanelReference to this in order to allow method chaining