sap.ui.comp.smartvariants.SmartVariantManagementUi2.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.smartvariants.SmartVariantManagementUi2 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.comp.variants.VariantManagement.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.smartvariants.SmartVariantManagementUi2.
Returns:
addPersonalizableControl(oCurrentControlInfo)
Registers all controls interested and relying on variant handling.
Parameters:
{sap.ui.comp/smartvariants/PersonalizableInfo} | oCurrentControlInfo | control providing the required aggregation for flex-layer |
Attaches event handler
fnFunction
to the
afterSave
event of this
sap.ui.comp.smartvariants.SmartVariantManagementUi2
.
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.smartvariants.SmartVariantManagementUi2
itself.
Fired after a variant is saved. This event can be used to retrieve the id of the saved 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.smartvariants.SmartVariantManagementUi2 itself |
Returns:
Attaches event handler
fnFunction
to the
initialise
event of this
sap.ui.comp.smartvariants.SmartVariantManagementUi2
.
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.smartvariants.SmartVariantManagementUi2
itself.
Once the SmartVariantManagement control has been initialized, and especially after retrieving the variants via the UI2 personalization service, the registered consumer will be notified that this phase has completed
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.smartvariants.SmartVariantManagementUi2 itself |
Returns:
Destroys the personalizableControl in the aggregation personalizableControl
.
Returns:
Detaches event handler
fnFunction
from the
afterSave
event of this
sap.ui.comp.smartvariants.SmartVariantManagementUi2
.
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:
Detaches event handler
fnFunction
from the
initialise
event of this
sap.ui.comp.smartvariants.SmartVariantManagementUi2
.
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:
exit()
Destroys the control.
Fires event afterSave
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event initialise
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getCurrentVariantId(): string
Retrieves the current variant ID. For a standard variant, an empty string is returned.
Returns:
{string} | Current variant ID |
Gets content of aggregation
personalizableControl
.
All controls that rely on variant handling have to be added to this aggregation. The only consumer currently known is the FilterBar control.
Returns:
getVariantContent(oControl, sKey): object
Retrieves the variant content.
Parameters:
Returns:
{object} | json object representing the content of the variant |
init()
Control initialization.
- Since:
- 1.28.0
initialise()
Initializes the UI2 personalization layer by retrieving the list of variants. Once the initialization has been completed, the control for personalization is informed via the initialise event.
isPageVariant(): boolean
Determines if the SmartVariantManagement instance is a page variant.
Returns:
{boolean} | always returns false |
setCurrentVariantId(sVariantId, bDoNotApplyVariant)
Sets the current variant ID.
Parameters:
{string} | sVariantId | ID of the variant |
{boolean} | bDoNotApplyVariant | If set to true , the applyVariant method is not executed yet. Relevant during navigation, when called before the initialise event has been executed |
Sets the aggregated personalizableControl
.
Parameters:
Returns: