sap.ui.comp.variants.VariantManagement.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.variants.VariantManagement 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 |
Returns a metadata object for class sap.ui.comp.variants.VariantManagement.
Returns:
Adds some variantItem to the aggregation variantItems
.
Parameters:
- Since:
- 1.26.0
Returns:
Attaches event handler
fnFunction
to the
manage
event of this
sap.ui.comp.variants.VariantManagement
.
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.variants.VariantManagement
itself.
This event is fired when users apply changes to variants in the Manage Variants dialog.
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.variants.VariantManagement itself |
- Since:
- 1.22.0
Returns:
Attaches event handler
fnFunction
to the
save
event of this
sap.ui.comp.variants.VariantManagement
.
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.variants.VariantManagement
itself.
This event is fired when the Save Variant dialog is closed with OK for a variant.
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.variants.VariantManagement itself |
- Since:
- 1.22.0
Returns:
Attaches event handler
fnFunction
to the
select
event of this
sap.ui.comp.variants.VariantManagement
.
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.variants.VariantManagement
itself.
This event is fired when a new variant is selected.
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.variants.VariantManagement itself |
- Since:
- 1.22.0
Returns:
clearVariantSelection()
Removes the current variant selection and resets to default value.
- Since:
- 1.22.0
Destroys all the variantItems in the aggregation variantItems
.
- Since:
- 1.26.0
Returns:
Detaches event handler
fnFunction
from the
manage
event of this
sap.ui.comp.variants.VariantManagement
.
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 |
- Since:
- 1.22.0
Returns:
Detaches event handler
fnFunction
from the
save
event of this
sap.ui.comp.variants.VariantManagement
.
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 |
- Since:
- 1.22.0
Returns:
Detaches event handler
fnFunction
from the
select
event of this
sap.ui.comp.variants.VariantManagement
.
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 |
- Since:
- 1.22.0
Returns:
Fires event
manage
to attached listeners.
Expects the following event parameters:
renamed
of type string[]
List of changed variant keysdeleted
of type string[]
List of deleted variant keysexe
of type object[]
List of variant keys and the associated Execute on Selection indicatordef
of type boolean
The default variant key
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.22.0
Returns:
Fires event
save
to attached listeners.
Expects the following event parameters:
name
of type string
The variant titleoverwrite
of type boolean
Indicates if an existing variant is overwritten or if a new variant is createdkey
of type string
The variant keyexe
of type boolean
The Execute on Selection indicatordef
of type boolean
The default variant indicatorglobal
of type boolean
The shared variant indicatorlifecyclePackage
of type string
The package namelifecycleTransportId
of type string
The transport ID
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.22.0
Returns:
Fires event
select
to attached listeners.
Expects the following event parameters:
key
of type string
The variant key
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.22.0
Returns:
getDefaultVariantKey(): string
Gets current value of property
defaultVariantKey
.
Provides a string value to set the default variant. Used for the save dialog. Has no effect on the selected variant.
- Since:
- 1.22.0
Returns:
{string} | Value of property defaultVariantKey |
getEnabled(): boolean
Gets current value of property
enabled
.
Can be set to true or false depending on whether you want to enable or disable the control.
Default value is true
.
- Since:
- 1.22.0
Returns:
{boolean} | Value of property enabled |
getIndustrySolutionMode(): boolean
Gets current value of property
industrySolutionMode
.
If set totrue
, the scenario is an industry-specific solution. This flag is only used internally in the app variant scenarios.
Default value is false
.
- Since:
- 1.32.0
Returns:
{boolean} | Value of property industrySolutionMode |
getInitialSelectionKey(): string
Gets current value of property
initialSelectionKey
.
Enables the setting of the initially selected variant.
- Since:
- 1.22.0
Returns:
{string} | Value of property initialSelectionKey |
getLifecycleSupport(): boolean
Gets current value of property
lifecycleSupport
.
Enables the lifecycle support. If set to true, the VariantManagement control handles the transport information for shared variants.
Default value is false
.
- Since:
- 1.26.0
Returns:
{boolean} | Value of property lifecycleSupport |
getSelectionKey(): string
Gets current value of property
selectionKey
.
The key of the currently selected item. Returns null if the default item list is selected.
- Since:
- 1.24.0
Returns:
{string} | Value of property selectionKey |
getShowExecuteOnSelection(): boolean
Gets current value of property
showExecuteOnSelection
.
Indicates that Execute on Selection is visible in the Save Variant and the Manage Variants dialogs.
Default value is false
.
- Since:
- 1.26.0
Returns:
{boolean} | Value of property showExecuteOnSelection |
getShowShare(): boolean
Gets current value of property
showShare
.
Indicates that Share is visible in the Save Variant and the Manage Variants dialogs. Share allows you to share variants with other users.
Default value is false
.
- Since:
- 1.26.0
Returns:
{boolean} | Value of property showShare |
getStandardItemText(): string
Gets current value of property
standardItemText
.
Overwrites the default Standard variant title.
- Since:
- 1.28.0
Returns:
{string} | Value of property standardItemText |
Gets content of aggregation
variantItems
.
Variant items displayed by the VariantManagement control.
- Since:
- 1.26.0
Returns:
indexOfVariantItem(oVariantItem): int
Checks for the provided sap.ui.comp.variants.VariantItem
in the aggregation variantItems
. and returns its index if found or -1 otherwise.
Parameters:
- Since:
- 1.26.0
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a variantItem into the aggregation variantItems
.
Parameters:
{sap.ui.comp.variants.VariantItem} | oVariantItem | the variantItem to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the variantItem should be inserted at; for a negative value of iIndex , the variantItem is inserted at position 0; for a value greater than the current size of the aggregation, the variantItem is inserted at the last position |
- Since:
- 1.26.0
Returns:
Removes all the controls from the aggregation
variantItems
.
Additionally, it unregisters them from the hosting UIArea.
- Since:
- 1.26.0
Returns:
Removes a variantItem from the aggregation variantItems
.
Parameters:
- Since:
- 1.26.0
Returns:
Sets a new value for property
defaultVariantKey
.
Provides a string value to set the default variant. Used for the save dialog. Has no effect on the selected variant.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sDefaultVariantKey | New value for property defaultVariantKey |
- Since:
- 1.22.0
Returns:
Sets a new value for property
enabled
.
Can be set to true or false depending on whether you want to enable or disable the control.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnabled | New value for property enabled |
- Since:
- 1.22.0
Returns:
Sets a new value for property
industrySolutionMode
.
If set totrue
, the scenario is an industry-specific solution. This flag is only used internally in the app variant scenarios.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bIndustrySolutionMode | New value for property industrySolutionMode |
- Since:
- 1.32.0
Returns:
Sets a new value for property
initialSelectionKey
.
Enables the setting of the initially selected variant.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sInitialSelectionKey | New value for property initialSelectionKey |
- Since:
- 1.22.0
Returns:
Sets a new value for property
lifecycleSupport
.
Enables the lifecycle support. If set to true, the VariantManagement control handles the transport information for shared variants.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bLifecycleSupport | New value for property lifecycleSupport |
- Since:
- 1.26.0
Returns:
Sets a new value for property
selectionKey
.
The key of the currently selected item. Returns null if the default item list is selected.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sSelectionKey | New value for property selectionKey |
- Since:
- 1.24.0
Returns:
Sets a new value for property
showExecuteOnSelection
.
Indicates that Execute on Selection is visible in the Save Variant and the Manage Variants dialogs.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowExecuteOnSelection | New value for property showExecuteOnSelection |
- Since:
- 1.26.0
Returns:
Sets a new value for property
showShare
.
Indicates that Share is visible in the Save Variant and the Manage Variants dialogs. Share allows you to share variants with other users.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowShare | New value for property showShare |
- Since:
- 1.26.0
Returns:
Sets a new value for property
standardItemText
.
Overwrites the default Standard variant title.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
{string} | sStandardItemText | New value for property standardItemText |
- Since:
- 1.28.0
Returns:
Adds some item to the aggregation items
.
Parameters:
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
Destroys all the items in the aggregation items
.
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
Gets content of aggregation
items
.
Items displayed by the VariantManagement control.
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
getShowCreateTile(): boolean
Gets current value of property
showCreateTile
.
Indicates that a Create Tile is visible in the Create dialog.
Default value is false
.
- Deprecated:
- Since version 1.32.0.
- Since:
- 1.26.0
Returns:
{boolean} | Value of property showCreateTile |
indexOfItem(oItem): int
Checks for the provided sap.ui.core.Item
in the aggregation items
. and returns its index if found or -1 otherwise.
Parameters:
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a item into the aggregation items
.
Parameters:
{sap.ui.core.Item} | oItem | the item to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the item should be inserted at; for a negative value of iIndex , the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position |
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
Removes all the controls from the aggregation
items
.
Additionally, it unregisters them from the hosting UIArea.
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
Removes a item from the aggregation items
.
Parameters:
- Deprecated:
- Since version 1.26.0. Replaced by association
variantItems
- Since:
- 1.22.0
Returns:
Sets a new value for property
showCreateTile
.
Indicates that a Create Tile is visible in the Create dialog.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bShowCreateTile | New value for property showCreateTile |
- Deprecated:
- Since version 1.32.0.
- Since:
- 1.26.0
Returns: