class sap.ui.comp.variants.VariantManagement

Visiblity: public
UX Guidelines:
Implements: sap.m.IOverflowToolbarContent
Available since: N/A
Module: sap/ui/comp/variants/VariantManagement
Application Component: CA-UI5-CMP

The VariantManagement control can be used to manage variants, such as filter bar variants or table variants.


Constructor

Constructor for a new VariantManagement.

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.ui.comp.variants.VariantManagement(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


Properties

Name Type Default Value Description
defaultVariantKey string

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.

Visibility: public
enabled boolean true

Can be set to true or false depending on whether you want to enable or disable the control.

Since: 1.22.0.

Visibility: public
inErrorState boolean false

Indicates that the control is in error state. If set to true error message will be displayed whenever the variant is opened.

Since: 1.52.0.

Visibility: public
initialSelectionKey string

Enables the setting of the initially selected variant.

Since: 1.22.0.

Visibility: public
lifecycleSupport boolean false

Enables the lifecycle support. If set to true, the VariantManagement control handles the transport information for shared variants.

Since: 1.26.0.

Visibility: public
selectionKey string

The key of the currently selected item. Returns null if the default item list is selected. This property is calculated when accessing it via the getSelectionKey method. The corresponding setSelectionKey method is not supported. The access via the standard set/getProperty is also not supported.

Since: 1.24.0.

Visibility: public
showCreateTile boolean false

Indicates that a Create Tile is visible in the Create dialog.

Since: 1.26.0.

Visibility: public
showExecuteOnSelection boolean false

Indicates that Execute on Selection is visible in the Save Variant and the Manage Variants dialogs.

Since: 1.26.0.

Visibility: public
showSetAsDefault boolean true

Indicates that set as default is visible in the Save Variant and the Manage Variants dialogs.

Since: 1.44.0.

Visibility: public
showShare boolean false

Indicates that the Public checkbox is visible in the Save View and the Manage Views dialogs. Selecting this checkbox allows you to share variants with other users.

Since: 1.26.0.

Visibility: public
standardItemAuthor string SAP

Defines the author of the standard variant, for example, the name of the own company.

Since: 1.86.

Visibility: public
standardItemText string

Overwrites the default Standard variant title.

Since: 1.28.0.

Visibility: public
useFavorites boolean false

Indicates that the 'Favorites' feature is used. Only variants marked as favorites will be displayed in the variant list.

Since: 1.50.0.

Visibility: public
variantCreationByUserAllowed boolean true

Indicates that end users are allowed to create variants.

Since: 1.85.

Visibility: public

Aggregations

Default Aggregation: items

Name Cardinality Type Description
items (default) 0..n sap.ui.core.Item

Items displayed by the VariantManagement control.
Deprecated as of version 1.26.0. Replaced by association variantItems

variantItems 0..n sap.ui.comp.variants.VariantItem

Variant items displayed by the VariantManagement control.

Since: 1.26.0.


Events Overview

Event Description
manage

This event is fired when users apply changes to variants in the Manage Variants dialog.

Since: 1.22.0.

save

This event is fired when the Save Variant dialog is closed with OK for a variant.

Since: 1.22.0.

select

This event is fired when a new variant is selected.

Since: 1.22.0.

manage

This event is fired when users apply changes to variants in the Manage Variants dialog.

Since: 1.22.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
renamed string[]

List of changed variant keys

deleted string[]

List of deleted variant keys

exe object[]

List of variant keys and the associated Execute on Selection indicator

def boolean

The default variant key

save

This event is fired when the Save Variant dialog is closed with OK for a variant.

Since: 1.22.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
name string

The variant title

overwrite boolean

Indicates if an existing variant is overwritten or if a new variant is created

key string

The variant key

exe boolean

The Execute on Selection indicator

def boolean

The default variant indicator

global boolean

The shared variant indicator

lifecyclePackage string

The package name

lifecycleTransportId string

The transport ID

select

This event is fired when a new variant is selected.

Since: 1.22.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
key string

The variant key


Methods Overview

Method Description
addItem

Adds some item to the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
addVariantItem

Adds some variantItem to the aggregation variantItems.

attachManage

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.

attachSave

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.

attachSelect

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.

clearVariantSelection

Removes the current variant selection and resets to default value.

currentVariantGetModified

Gets the dirty flag of the current variant.

currentVariantSetModified

Sets the dirty flag of the current variant.

destroyItems

Destroys all the items in the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
destroyVariantItems

Destroys all the variantItems in the aggregation variantItems.

detachManage

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.

detachSave

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.

detachSelect

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.

sap.ui.comp.variants.VariantManagement.extend

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.

fireManage

Fires event manage to attached listeners.

fireSave

Fires event save to attached listeners.

fireSelect

Fires event select to attached listeners.

getDefaultVariantKey

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.

getEnabled

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.

getInErrorState

Gets current value of property inErrorState.

Indicates that the control is in error state. If set to true error message will be displayed whenever the variant is opened.

Default value is false.

getInitialSelectionKey

Gets current value of property initialSelectionKey.

Enables the setting of the initially selected variant.

getItems

Gets content of aggregation items.

Items displayed by the VariantManagement control.

Since 1.26.0 Replaced by association <code>variantItems</code>
getLifecycleSupport

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.

sap.ui.comp.variants.VariantManagement.getMetadata

Returns a metadata object for class sap.ui.comp.variants.VariantManagement.

getOverflowToolbarConfig

Required by the sap.m.IOverflowToolbarContent interface. Registers invalidations event which is fired when width of the control is changed.

getSelectionKey

Gets current value of property selectionKey.

The key of the currently selected item. Returns null if the default item list is selected. This property is calculated when accessing it via the getSelectionKey method. The corresponding setSelectionKey method is not supported. The access via the standard set/getProperty is also not supported.

getShowCreateTile

Gets current value of property showCreateTile.

Indicates that a Create Tile is visible in the Create dialog.

Default value is false.

getShowExecuteOnSelection

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.

getShowSetAsDefault

Gets current value of property showSetAsDefault.

Indicates that set as default is visible in the Save Variant and the Manage Variants dialogs.

Default value is true.

getShowShare

Gets current value of property showShare.

Indicates that the Public checkbox is visible in the Save View and the Manage Views dialogs. Selecting this checkbox allows you to share variants with other users.

Default value is false.

getStandardItemAuthor

Gets current value of property standardItemAuthor.

Defines the author of the standard variant, for example, the name of the own company.

Default value is "SAP".

getStandardItemText

Gets current value of property standardItemText.

Overwrites the default Standard variant title.

getUseFavorites

Gets current value of property useFavorites.

Indicates that the 'Favorites' feature is used. Only variants marked as favorites will be displayed in the variant list.

Default value is false.

getVariantCreationByUserAllowed

Gets current value of property variantCreationByUserAllowed.

Indicates that end users are allowed to create variants.

Default value is true.

getVariantItems

Gets content of aggregation variantItems.

Variant items displayed by the VariantManagement control.

indexOfItem

Checks for the provided sap.ui.core.Item in the aggregation items. and returns its index if found or -1 otherwise.

Since 1.26.0 Replaced by association <code>variantItems</code>
indexOfVariantItem

Checks for the provided sap.ui.comp.variants.VariantItem in the aggregation variantItems. and returns its index if found or -1 otherwise.

insertItem

Inserts a item into the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
insertVariantItem

Inserts a variantItem into the aggregation variantItems.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Since 1.26.0 Replaced by association <code>variantItems</code>
removeAllVariantItems

Removes all the controls from the aggregation variantItems.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
removeVariantItem

Removes a variantItem from the aggregation variantItems.

setBackwardCompatibility

Defines the internal mode. The VariantManagement is able to support two different modes:
1. the mode with standard entry displayed as 'Default' and
2. the mode with standard entry displayed as 'Standard'.
The 'Default' display is the initial mode.
Note: this method has to be executed, before any items are assigned to the VariantManagement control!

setDefaultVariantKey

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.

setEnabled

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.

setInErrorState

Sets a new value for property inErrorState.

Indicates that the control is in error state. If set to true error message will be displayed whenever the variant is opened.

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

Default value is false.

setInitialSelectionKey

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.

setLifecycleSupport

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.

setSelectionKey

Sets a new value for property selectionKey.

The key of the currently selected item. Returns null if the default item list is selected. This property is calculated when accessing it via the getSelectionKey method. The corresponding setSelectionKey method is not supported. The access via the standard set/getProperty is also not supported.

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

setShowCreateTile

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.

setShowExecuteOnSelection

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.

setShowSetAsDefault

Sets a new value for property showSetAsDefault.

Indicates that set as default 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 true.

setShowShare

Sets a new value for property showShare.

Indicates that the Public checkbox is visible in the Save View and the Manage Views dialogs. Selecting this checkbox 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.

setStandardItemAuthor

Sets a new value for property standardItemAuthor.

Defines the author of the standard variant, for example, the name of the own company.

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

Default value is "SAP".

setStandardItemText

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.

setUseFavorites

Sets a new value for property useFavorites.

Indicates that the 'Favorites' feature is used. Only variants marked as favorites will be displayed in the variant list.

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

Default value is false.

setVariantCreationByUserAllowed

Sets a new value for property variantCreationByUserAllowed.

Indicates that end users are allowed to create variants.

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

Default value is true.

addItem

Adds some item to the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
Param Type DefaultValue Description
oItem sap.ui.core.Item

The item to add; if empty, nothing is inserted

addVariantItem

Adds some variantItem to the aggregation variantItems.

Param Type DefaultValue Description
oVariantItem sap.ui.comp.variants.VariantItem

The variantItem to add; if empty, nothing is inserted

attachManage

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.

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 sap.ui.comp.variants.VariantManagement itself

attachSave

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.

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 sap.ui.comp.variants.VariantManagement itself

attachSelect

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.

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 sap.ui.comp.variants.VariantManagement itself

clearVariantSelection

Removes the current variant selection and resets to default value.

currentVariantGetModified

Gets the dirty flag of the current variant.

currentVariantSetModified

Sets the dirty flag of the current variant.

Param Type DefaultValue Description
bFlag boolean

The value indicating the dirty state of the current variant

destroyItems

Destroys all the items in the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>

destroyVariantItems

Destroys all the variantItems in the aggregation variantItems.

detachManage

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.

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

detachSave

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.

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

detachSelect

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.

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

sap.ui.comp.variants.VariantManagement.extend

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.

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

fireManage

Fires event manage to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

renamed string[]

List of changed variant keys

deleted string[]

List of deleted variant keys

exe object[]

List of variant keys and the associated Execute on Selection indicator

def boolean

The default variant key

fireSave

Fires event save to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

name string

The variant title

overwrite boolean

Indicates if an existing variant is overwritten or if a new variant is created

key string

The variant key

exe boolean

The Execute on Selection indicator

def boolean

The default variant indicator

global boolean

The shared variant indicator

lifecyclePackage string

The package name

lifecycleTransportId string

The transport ID

fireSelect

Fires event select to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

key string

The variant key

getDefaultVariantKey

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.

getEnabled

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.

getInErrorState

Gets current value of property inErrorState.

Indicates that the control is in error state. If set to true error message will be displayed whenever the variant is opened.

Default value is false.

getInitialSelectionKey

Gets current value of property initialSelectionKey.

Enables the setting of the initially selected variant.

getItems

Gets content of aggregation items.

Items displayed by the VariantManagement control.

Since 1.26.0 Replaced by association <code>variantItems</code>

getLifecycleSupport

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.

sap.ui.comp.variants.VariantManagement.getMetadata

Returns a metadata object for class sap.ui.comp.variants.VariantManagement.

getOverflowToolbarConfig

Required by the sap.m.IOverflowToolbarContent interface. Registers invalidations event which is fired when width of the control is changed.

getSelectionKey

Gets current value of property selectionKey.

The key of the currently selected item. Returns null if the default item list is selected. This property is calculated when accessing it via the getSelectionKey method. The corresponding setSelectionKey method is not supported. The access via the standard set/getProperty is also not supported.

getShowCreateTile

Gets current value of property showCreateTile.

Indicates that a Create Tile is visible in the Create dialog.

Default value is false.

getShowExecuteOnSelection

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.

getShowSetAsDefault

Gets current value of property showSetAsDefault.

Indicates that set as default is visible in the Save Variant and the Manage Variants dialogs.

Default value is true.

getShowShare

Gets current value of property showShare.

Indicates that the Public checkbox is visible in the Save View and the Manage Views dialogs. Selecting this checkbox allows you to share variants with other users.

Default value is false.

getStandardItemAuthor

Gets current value of property standardItemAuthor.

Defines the author of the standard variant, for example, the name of the own company.

Default value is "SAP".

getStandardItemText

Gets current value of property standardItemText.

Overwrites the default Standard variant title.

getUseFavorites

Gets current value of property useFavorites.

Indicates that the 'Favorites' feature is used. Only variants marked as favorites will be displayed in the variant list.

Default value is false.

getVariantCreationByUserAllowed

Gets current value of property variantCreationByUserAllowed.

Indicates that end users are allowed to create variants.

Default value is true.

getVariantItems

Gets content of aggregation variantItems.

Variant items displayed by the VariantManagement control.

indexOfItem

Checks for the provided sap.ui.core.Item in the aggregation items. and returns its index if found or -1 otherwise.

Since 1.26.0 Replaced by association <code>variantItems</code>
Param Type DefaultValue Description
oItem sap.ui.core.Item

The item whose index is looked for

indexOfVariantItem

Checks for the provided sap.ui.comp.variants.VariantItem in the aggregation variantItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oVariantItem sap.ui.comp.variants.VariantItem

The variantItem whose index is looked for

insertItem

Inserts a item into the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
Param Type DefaultValue Description
oItem sap.ui.core.Item

The item to insert; if empty, nothing is inserted

iIndex int

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

insertVariantItem

Inserts a variantItem into the aggregation variantItems.

Param Type DefaultValue Description
oVariantItem sap.ui.comp.variants.VariantItem

The variantItem to insert; if empty, nothing is inserted

iIndex int

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

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

Since 1.26.0 Replaced by association <code>variantItems</code>

removeAllVariantItems

Removes all the controls from the aggregation variantItems.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

Since 1.26.0 Replaced by association <code>variantItems</code>
Param Type DefaultValue Description
vItem int string sap.ui.core.Item

The item to remove or its index or id

removeVariantItem

Removes a variantItem from the aggregation variantItems.

Param Type DefaultValue Description
vVariantItem int string sap.ui.comp.variants.VariantItem

The variantItem to remove or its index or id

setBackwardCompatibility

Defines the internal mode. The VariantManagement is able to support two different modes:
1. the mode with standard entry displayed as 'Default' and
2. the mode with standard entry displayed as 'Standard'.
The 'Default' display is the initial mode.
Note: this method has to be executed, before any items are assigned to the VariantManagement control!

Param Type DefaultValue Description
bFlag boolean

defines the behavior: false new mode, otherwize 'old' mode.

setDefaultVariantKey

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.

Param Type DefaultValue Description
sDefaultVariantKey string

New value for property defaultVariantKey

setEnabled

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.

Param Type DefaultValue Description
bEnabled boolean true

New value for property enabled

setInErrorState

Sets a new value for property inErrorState.

Indicates that the control is in error state. If set to true error message will be displayed whenever the variant is opened.

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
bInErrorState boolean false

New value for property inErrorState

setInitialSelectionKey

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.

Param Type DefaultValue Description
sInitialSelectionKey string

New value for property initialSelectionKey

setLifecycleSupport

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.

Param Type DefaultValue Description
bLifecycleSupport boolean false

New value for property lifecycleSupport

setSelectionKey

Sets a new value for property selectionKey.

The key of the currently selected item. Returns null if the default item list is selected. This property is calculated when accessing it via the getSelectionKey method. The corresponding setSelectionKey method is not supported. The access via the standard set/getProperty is also not supported.

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

Param Type DefaultValue Description
sSelectionKey string

New value for property selectionKey

setShowCreateTile

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.

Param Type DefaultValue Description
bShowCreateTile boolean false

New value for property showCreateTile

setShowExecuteOnSelection

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.

Param Type DefaultValue Description
bShowExecuteOnSelection boolean false

New value for property showExecuteOnSelection

setShowSetAsDefault

Sets a new value for property showSetAsDefault.

Indicates that set as default 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 true.

Param Type DefaultValue Description
bShowSetAsDefault boolean true

New value for property showSetAsDefault

setShowShare

Sets a new value for property showShare.

Indicates that the Public checkbox is visible in the Save View and the Manage Views dialogs. Selecting this checkbox 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.

Param Type DefaultValue Description
bShowShare boolean false

New value for property showShare

setStandardItemAuthor

Sets a new value for property standardItemAuthor.

Defines the author of the standard variant, for example, the name of the own company.

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

Default value is "SAP".

Param Type DefaultValue Description
sStandardItemAuthor string "SAP"

New value for property standardItemAuthor

setStandardItemText

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.

Param Type DefaultValue Description
sStandardItemText string

New value for property standardItemText

setUseFavorites

Sets a new value for property useFavorites.

Indicates that the 'Favorites' feature is used. Only variants marked as favorites will be displayed in the variant list.

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
bUseFavorites boolean false

New value for property useFavorites

setVariantCreationByUserAllowed

Sets a new value for property variantCreationByUserAllowed.

Indicates that end users are allowed to create variants.

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
bVariantCreationByUserAllowed boolean true

New value for property variantCreationByUserAllowed