Class sap.ui.comp.variants.VariantItemModule: sap/ui/comp/variants/VariantItem

extends Item

The VariantItem class describes a variant item.

Constructor Summary
new sap.ui.comp.variants.VariantItem(sId?, mSettings?)Constructor for a new variants/VariantItem.
Method Summary
sap.ui.comp.variants.VariantItem.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.variants.VariantItem with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.variants.VariantItem.getMetadata()Returns a metadata object for class sap.ui.comp.variants.VariantItem.
getAuthor()Gets current value of property author.
getExecuteOnSelection()Gets current value of property executeOnSelection.
getGlobal()Gets current value of property global.
getLabelReadOnly()Gets current value of property labelReadOnly.
getLifecyclePackage()Gets current value of property lifecyclePackage.
getLifecycleTransportId()Gets current value of property lifecycleTransportId.
getNamespace()Gets current value of property namespace.
getReadOnly()Gets current value of property readOnly.
setAuthor(sAuthor)Sets a new value for property author.
setExecuteOnSelection(bExecuteOnSelection)Sets a new value for property executeOnSelection.
setGlobal(bGlobal)Sets a new value for property global.
setLabelReadOnly(bLabelReadOnly)Sets a new value for property labelReadOnly.
setLifecyclePackage(sLifecyclePackage)Sets a new value for property lifecyclePackage.
setLifecycleTransportId(sLifecycleTransportId)Sets a new value for property lifecycleTransportId.
setNamespace(sNamespace)Sets a new value for property namespace.
setReadOnly(bReadOnly)Sets a new value for property readOnly.
getAccessOptions()Gets current value of property accessOptions.
setAccessOptions(sAccessOptions)Sets a new value for property accessOptions.
Constructor Detail
new sap.ui.comp.variants.VariantItem(sId?, mSettings?)
Constructor for a new variants/VariantItem.

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.Item 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
Method Detail
sap.ui.comp.variants.VariantItem.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.variants.VariantItem 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.Item.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.ui.comp.variants.VariantItem.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.variants.VariantItem.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
getAuthor(): string
Gets current value of property author.

Author of the variant

Since:
1.38.0
Returns:
{string} Value of property author
getExecuteOnSelection(): boolean
Gets current value of property executeOnSelection.

Attribute for usage in Smart Filter Bar

Default value is false.

Since:
1.26.0
Returns:
{boolean} Value of property executeOnSelection
getGlobal(): boolean
Gets current value of property global.

Indicator if a variant is visible for all users.

Since:
1.26.0
Returns:
{boolean} Value of property global
getLabelReadOnly(): boolean
Gets current value of property labelReadOnly.

Indicates if the variant title can be changed.

Default value is false.

Since:
1.26.0
Returns:
{boolean} Value of property labelReadOnly
getLifecyclePackage(): string
Gets current value of property lifecyclePackage.

ABAP package the variant is assigned to. Used for transport functionality.

Since:
1.26.0
Returns:
{string} Value of property lifecyclePackage
getLifecycleTransportId(): string
Gets current value of property lifecycleTransportId.

Identifier of the transport object the variant is assigned to.

Since:
1.26.0
Returns:
{string} Value of property lifecycleTransportId
getNamespace(): string
Gets current value of property namespace.

Variant namespace

Since:
1.26.0
Returns:
{string} Value of property namespace
getReadOnly(): boolean
Gets current value of property readOnly.

Is the user allowed to change the item's data

Default value is false.

Since:
1.26.0
Returns:
{boolean} Value of property readOnly
Sets a new value for property author.

Author of the variant

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

Parameters:
{string}sAuthor New value for property author
Since:
1.38.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
setExecuteOnSelection(bExecuteOnSelection): sap.ui.comp.variants.VariantItem
Sets a new value for property executeOnSelection.

Attribute for usage in Smart Filter Bar

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

Default value is false.

Parameters:
{boolean}bExecuteOnSelection New value for property executeOnSelection
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
Sets a new value for property global.

Indicator if a variant is visible for all users.

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

Parameters:
{boolean}bGlobal New value for property global
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
setLabelReadOnly(bLabelReadOnly): sap.ui.comp.variants.VariantItem
Sets a new value for property labelReadOnly.

Indicates if the variant title can be changed.

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

Default value is false.

Parameters:
{boolean}bLabelReadOnly New value for property labelReadOnly
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
setLifecyclePackage(sLifecyclePackage): sap.ui.comp.variants.VariantItem
Sets a new value for property lifecyclePackage.

ABAP package the variant is assigned to. Used for transport functionality.

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

Parameters:
{string}sLifecyclePackage New value for property lifecyclePackage
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
setLifecycleTransportId(sLifecycleTransportId): sap.ui.comp.variants.VariantItem
Sets a new value for property lifecycleTransportId.

Identifier of the transport object the variant is assigned to.

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

Parameters:
{string}sLifecycleTransportId New value for property lifecycleTransportId
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
setNamespace(sNamespace): sap.ui.comp.variants.VariantItem
Sets a new value for property namespace.

Variant namespace

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

Parameters:
{string}sNamespace New value for property namespace
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
setReadOnly(bReadOnly): sap.ui.comp.variants.VariantItem
Sets a new value for property readOnly.

Is the user allowed to change the item's data

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

Default value is false.

Parameters:
{boolean}bReadOnly New value for property readOnly
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining
getAccessOptions(): string
Gets current value of property accessOptions.

Flags for a variant to indicate why it might be read-only.

Deprecated:
Since version 1.28.0. Replaced by property labelReadOnly
Since:
1.26.0
Returns:
{string} Value of property accessOptions
setAccessOptions(sAccessOptions): sap.ui.comp.variants.VariantItem
Sets a new value for property accessOptions.

Flags for a variant to indicate why it might be read-only.

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

Parameters:
{string}sAccessOptions New value for property accessOptions
Deprecated:
Since version 1.28.0. Replaced by property labelReadOnly
Since:
1.26.0
Returns:
{sap.ui.comp.variants.VariantItem} Reference to this in order to allow method chaining