The ConditionPanel Control will be used to implement the Sorting, Filtering and Grouping panel of the new Personalization dialog.
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#constructor for a general description of the syntax of the settings object.
new sap.m.P13nConditionPanel(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 |
---|---|---|---|
alwaysShowAddIcon | boolean | true | 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. Visibility: public |
autoAddNewRow | boolean | false | adds initial a new empty condition row Visibility: public |
autoReduceKeyFieldItems | boolean | false | KeyField value can only be selected once. When you set the property to |
containerQuery | boolean | false | defines if the mediaQuery or a ContainerResize will be used for layout update. When the |
disableFirstRemoveIcon | boolean | false | makes the remove icon on the first condition row disabled when only one condition exist. Visibility: public |
displayFormat | string | This represents the displayFormat of the condition Values. With the value "UpperCase" the entered value of the condition will be converted to upperCase. Visibility: public |
|
exclude | boolean | false | exclude options for filter Visibility: public |
layoutMode | string | 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. Visibility: public |
|
maxConditions | string | -1 | defines the max number of conditions on the ConditionPanel Visibility: public |
showLabel | boolean | false | show additional labels in the condition Visibility: public |
usePrevConditionSetting | boolean | true | new added condition use the settings from the previous condition as default. Visibility: public |
validationExecutor | object | Calls the validation listener tbd... Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
content | 0..n | sap.ui.core.Control |
Content for the ConditionPanel. This aggregation is not public! |
Method | Description |
---|---|
addCondition |
add a single condition. |
addKeyField |
add a single KeyField |
addOperation |
add a single operation |
attachDataChange |
Attaches event handler When called, the context of the event handler (its Workaround for updating the binding |
detachDataChange |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.P13nConditionPanel.extend |
Creates a new subclass of class sap.m.P13nConditionPanel with name
|
fireDataChange |
Fires event dataChange to attached listeners. |
getAlwaysShowAddIcon |
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 |
getAutoAddNewRow |
Gets current value of property autoAddNewRow. adds initial a new empty condition row Default value is |
getAutoReduceKeyFieldItems |
Gets current value of property autoReduceKeyFieldItems. KeyField value can only be selected once. When you set the property to Default value is |
getConditions |
returns array of all defined conditions. |
getContainerQuery |
Gets current value of property containerQuery. defines if the mediaQuery or a ContainerResize will be used for layout update. When the Default value is |
getDisableFirstRemoveIcon |
Gets current value of property disableFirstRemoveIcon. makes the remove icon on the first condition row disabled when only one condition exist. Default value is |
getDisplayFormat |
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. |
getExclude |
Gets current value of property exclude. exclude options for filter Default value is |
sap.m.P13nConditionPanel.getFormatedConditionText |
creates and returns a formatted text for the specified condition |
getKeyFields |
getter for KeyFields array |
getLayoutMode |
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. |
getMaxConditions |
Gets current value of property maxConditions. defines the max number of conditions on the ConditionPanel Default value is |
sap.m.P13nConditionPanel.getMetadata |
Returns a metadata object for class sap.m.P13nConditionPanel. |
getOperations |
returns the default array of operations |
getShowLabel |
Gets current value of property showLabel. show additional labels in the condition Default value is |
getUsePrevConditionSetting |
Gets current value of property usePrevConditionSetting. new added condition use the settings from the previous condition as default. Default value is |
getValidationExecutor |
Gets current value of property validationExecutor. Calls the validation listener tbd... |
insertCondition |
insert a single condition. |
removeAllConditions |
remove all conditions. |
removeAllKeyFields |
removes all KeyFields |
removeAllOperations |
remove all operations |
removeCondition |
remove a single condition. |
removeInvalidConditions |
removes all invalid conditions. |
removeValidationErrors |
removes all errors/warning states from the value1/2 fields of all conditions. |
setAutoAddNewRow |
Sets a new value for property autoAddNewRow. adds initial a new empty condition row When called with a value of Default value is |
setAutoReduceKeyFieldItems |
Sets a new value for property autoReduceKeyFieldItems. KeyField value can only be selected once. When you set the property to When called with a value of Default value is |
setConditions |
This method must be used to assign a list of conditions. |
setDisableFirstRemoveIcon |
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 Default value is |
setDisplayFormat |
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 |
setExclude |
Sets a new value for property exclude. exclude options for filter When called with a value of Default value is |
setKeyFields |
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. |
setMaxConditions |
Sets a new value for property maxConditions. defines the max number of conditions on the ConditionPanel When called with a value of Default value is |
setOperations |
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. |
setShowLabel |
Sets a new value for property showLabel. show additional labels in the condition When called with a value of Default value is |
setUsePrevConditionSetting |
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 Default value is |
setValidationExecutor |
Sets a new value for property validationExecutor. Calls the validation listener tbd... When called with a value of |
add a single condition.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | object |
the new condition of type |
add a single KeyField
Param | Type | DefaultValue | Description |
---|---|---|---|
oKeyField | object |
{key: "CompanyCode", text: "ID"} |
add a single operation
Param | Type | DefaultValue | Description |
---|---|---|---|
oOperation | sap.m.P13nConditionOperation | ||
sType | string |
defines the type for which this operations will be used. |
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
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 dataChange event of this sap.m.P13nConditionPanel
.
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.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.
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 dataChange to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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
.
Gets current value of property autoAddNewRow.
adds initial a new empty condition row
Default value is false
.
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
.
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
.
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
.
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.
creates and returns a formatted text for the specified condition
Param | Type | DefaultValue | Description |
---|---|---|---|
sOperation | string |
the operation type sap.m.P13nConditionOperation |
|
sValue1 | string |
value of the first range field |
|
sValue2 | string |
value of the second range field |
|
bExclude | boolean |
indicates if the range is an Exclude range |
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.
Gets current value of property maxConditions.
defines the max number of conditions on the ConditionPanel
Default value is '-1'
.
returns the default array of operations
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | string | default |
defines the type for which the operations should be returned. |
Gets current value of property showLabel.
show additional labels in the condition
Default value is false
.
Gets current value of property usePrevConditionSetting.
new added condition use the settings from the previous condition as default.
Default value is true
.
Gets current value of property validationExecutor.
Calls the validation listener tbd...
insert a single condition.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCondition | object |
the new condition of type |
|
index | int |
of the new condition |
remove all operations
Param | Type | DefaultValue | Description |
---|---|---|---|
sType | string |
defines the type for which all operations should be removed |
remove a single condition.
Param | Type | DefaultValue | Description |
---|---|---|---|
vCondition | object |
is the condition which should be removed. can be either a string with the key of the condition of the condition object itself. |
removes all errors/warning states from the value1/2 fields of all conditions.
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bAutoAddNewRow | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bAutoReduceKeyFieldItems | boolean | false |
New value for property |
This method must be used to assign a list of conditions.
Param | Type | DefaultValue | Description |
---|---|---|---|
aConditions | object[] |
array of Conditions. |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bDisableFirstRemoveIcon | boolean | false |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sDisplayFormat | string |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bExclude | boolean | false |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
aKeyFields | array |
array of KeyFields |
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'
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sMaxConditions | string | '-1' |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
aOperations | sap.m.P13nConditionOperation[] |
array of operations |
|
sType | string |
defines the type for which this operations will be used. is |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowLabel | boolean | false |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUsePrevConditionSetting | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
oValidationExecutor | object |
New value for property |