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 !!!

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(mArguments?)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:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? initial settings for the new control
Event Detail
dataChange(oControlEvent)
Workaround for updating the binding
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.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:
{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.m.P13nConditionPanel.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.P13nConditionPanel.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addCondition(oCondition)
add a single condition.
Parameters:
{object}oCondition the new condition of type { "key": "007", "operation": sap.m.P13nConditionOperation.Ascending, "keyField": "keyFieldKey", "value1": "", "value2": ""};
Since:
1.26.0
addKeyField(oKeyField)
add a single KeyField
Parameters:
{object}oKeyField {key: "CompanyCode", text: "ID"}
Since:
1.26.0
addOperation(oOperation, sType)
add a single operation
Parameters:
{sap.m.P13nConditionOperation}oOperation
{string}sType defines the type for which this operations will be used.
Since:
1.26.0
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:
{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.m.P13nConditionPanel itself
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{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.m.P13nConditionPanel} Reference to this in order to allow method chaining
fireDataChange(mArguments?): sap.m.P13nConditionPanel
Fires event dataChange to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{boolean} Value of property alwaysShowAddIcon
getAutoAddNewRow(): boolean
Gets current value of property autoAddNewRow.

adds initial a new empty condition row

Default value is false.

Returns:
{boolean} Value 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:
{boolean} Value of property autoReduceKeyFieldItems
getConditions(): object[]
returns array of all defined conditions.
Since:
1.26.0
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:
{boolean} Value 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:
{boolean} Value 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:
{string} Value of property displayFormat
getExclude(): boolean
Gets current value of property exclude.

exclude options for filter

Default value is false.

Returns:
{boolean} Value of property exclude
getKeyFields(): object[]
getter for KeyFields array
Since:
1.26.0
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:
{string} Value 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:
{string} Value of property maxConditions
getOperations(sType): sap.m.P13nConditionOperation[]
returns the default array of operations
Parameters:
{string}sType defines the type for which the operations should be returned.
Since:
1.26.0
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:
{boolean} Value 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:
{boolean} Value of property usePrevConditionSetting
getValidationExecutor(): object
Gets current value of property validationExecutor.

Calls the validation listener tbd...

Returns:
{object} Value of property validationExecutor
insertCondition(oCondition, index)
insert a single condition.
Parameters:
{object}oCondition the new condition of type { "key": "007", "operation": sap.m.P13nConditionOperation.Ascending, "keyField": "keyFieldKey", "value1": "", "value2": ""};
{int}index of the new condition
Since:
1.26.0
removeAllConditions()
remove all conditions.
Since:
1.26.0
removeAllKeyFields()
removes all KeyFields
Since:
1.26.0
removeAllOperations(sType)
remove all operations
Parameters:
{string}sType defines the type for which all operations should be removed
Since:
1.26.0
removeCondition(vCondition)
remove a single condition.
Parameters:
{object}vCondition is the condition which should be removed. can be either a string with the key of the condition of the condition object itself.
Since:
1.26.0
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:
{boolean}bAutoAddNewRow New value for property autoAddNewRow
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{boolean}bAutoReduceKeyFieldItems New value for property autoReduceKeyFieldItems
Returns:
{sap.m.P13nConditionPanel} Reference to this in order to allow method chaining
setConditions(aConditions)
This method must be used to assign a list of conditions.
Parameters:
{object[]}aConditions array of Conditions.
Since:
1.26.0
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:
{boolean}bDisableFirstRemoveIcon New value for property disableFirstRemoveIcon
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{string}sDisplayFormat New value for property displayFormat
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{boolean}bExclude New value for property exclude
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{array}aKeyFields array of KeyFields [{key: "CompanyCode", text: "ID"}, {key:"CompanyName", text : "Name"}]
Since:
1.26.0
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:
{string}sMaxConditions New value for property maxConditions
Returns:
{sap.m.P13nConditionPanel} Reference 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[]}aOperations array of operations [sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.EQ]
{string}sType defines the type for which this operations will be used. is sType is not defined the operations will be used as default operations.
Since:
1.26.0
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:
{boolean}bShowLabel New value for property showLabel
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{boolean}bUsePrevConditionSetting New value for property usePrevConditionSetting
Returns:
{sap.m.P13nConditionPanel} Reference 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:
{object}oValidationExecutor New value for property validationExecutor
Returns:
{sap.m.P13nConditionPanel} Reference to this in order to allow method chaining