class sap.ui.vtm.Vtm

Control sample: sap.ui.vtm.Vtm
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/vtm/Vtm
Application Component:

The main entry point for constructing VTM controls.


Constructor

Constructor for a new Vtm. This constructor can be used to construct an instance of sap.ui.vtm.Vtm with a specific set of extensions. Alternatively sap.ui.vtm.createVtm can be used to create a sap.ui.vtm.Vtm instance with a default set of extensions.

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.vtm.Vtm(sId, mSettings)
Param Type Default Value Description
sId string

The id to use for the sap.ui.vtm.Vtm instance.

mSettings object

A set of settings for the sap.ui.vtm.Vtm instance (normally used to populate the extensions aggregation).


Properties

Name Type Default Value Description
addDefaultExtensions boolean

When true populates the extensions aggregation with the default set of extensions in the default configuration.

Visibility: public

Aggregations

Default Aggregation: extensions

Name Cardinality Type Description
extensions (default) 0..n sap.ui.vtm.Extension

The set of VTM extensions. Extensions are used to provide extensibility. Default behaviors are implemented as extensions that can be replaced.


Events Overview

Event Description
activePanelChanged

Raised when the active panel has changed.

initialized

Raised when this sap.ui.vtm.Vtm instance and its extensions have been initialized.

Applications should add event handlers after the sap.ui.vtm.Vtm instance has initialized so that the extensions can attach event handlers before the application attempts to attach event handlers to the same events.

panelAdded

Raised when a panel has been added.

activePanelChanged

Raised when the active panel has changed.

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

initialized

Raised when this sap.ui.vtm.Vtm instance and its extensions have been initialized.

Applications should add event handlers after the sap.ui.vtm.Vtm instance has initialized so that the extensions can attach event handlers before the application attempts to attach event handlers to the same events.

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

panelAdded

Raised when a panel has been added.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
panel sap.ui.vtm.Panel

Methods Overview

Method Description
addExtension

Adds some extension to the aggregation extensions.

attachActivePanelChanged

Attaches event handler fnFunction to the activePanelChanged event of this sap.ui.vtm.Vtm.

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.vtm.Vtm itself.

Raised when the active panel has changed.

attachInitialized

Attaches event handler fnFunction to the initialized event of this sap.ui.vtm.Vtm.

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.vtm.Vtm itself.

Raised when this sap.ui.vtm.Vtm instance and its extensions have been initialized.

Applications should add event handlers after the sap.ui.vtm.Vtm instance has initialized so that the extensions can attach event handlers before the application attempts to attach event handlers to the same events.

attachPanelAdded

Attaches event handler fnFunction to the panelAdded event of this sap.ui.vtm.Vtm.

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.vtm.Vtm itself.

Raised when a panel has been added.

createPanel

Creates a VTM panel associated with this sap.ui.vtm.Vtm instance.

destroyExtensions

Destroys all the extensions in the aggregation extensions.

detachActivePanelChanged

Detaches event handler fnFunction from the activePanelChanged event of this sap.ui.vtm.Vtm.

The passed function and listener object must match the ones used for event registration.

detachInitialized

Detaches event handler fnFunction from the initialized event of this sap.ui.vtm.Vtm.

The passed function and listener object must match the ones used for event registration.

detachPanelAdded

Detaches event handler fnFunction from the panelAdded event of this sap.ui.vtm.Vtm.

The passed function and listener object must match the ones used for event registration.

sap.ui.vtm.Vtm.extend

Creates a new subclass of class sap.ui.vtm.Vtm 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.Element.extend.

fireActivePanelChanged

Fires event activePanelChanged to attached listeners.

fireInitialized

Fires event initialized to attached listeners.

firePanelAdded

Fires event panelAdded to attached listeners.

getActivePanel

Gets the active panel.

getAddDefaultExtensions

Gets current value of property addDefaultExtensions.

When true populates the extensions aggregation with the default set of extensions in the default configuration.

getExtensionByInterface

Gets the extension implementing a specified interface.

Returns undefined if there is not exactly one matching extension.

getExtensionByName

Gets an extension with a specified class name.

Returns undefined if there is not exactly one matching extension.

getExtensions

Gets content of aggregation extensions.

The set of VTM extensions. Extensions are used to provide extensibility. Default behaviors are implemented as extensions that can be replaced.

getExtensionsByInterface

Gets the extensions implementing a specified interface.

getExtensionsByName

Gets the extensions with a specified class name.

sap.ui.vtm.Vtm.getMetadata

Returns a metadata object for class sap.ui.vtm.Vtm.

getPanel

Gets a panel given its id. Returns undefined if no match is found.

getPanels

Gets the set of created panels. Do not modify the returned array.

getScene

Gets the scene.

indexOfExtension

Checks for the provided sap.ui.vtm.Extension in the aggregation extensions. and returns its index if found or -1 otherwise.

insertExtension

Inserts a extension into the aggregation extensions.

removeAllExtensions

Removes all the controls from the aggregation extensions.

Additionally, it unregisters them from the hosting UIArea.

removeExtension

Removes a extension from the aggregation extensions.

setActivePanel

Sets the active panel.

setAddDefaultExtensions

Sets a new value for property addDefaultExtensions.

When true populates the extensions aggregation with the default set of extensions in the default configuration.

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

addExtension

Adds some extension to the aggregation extensions.

Param Type DefaultValue Description
oExtension sap.ui.vtm.Extension

The extension to add; if empty, nothing is inserted

attachActivePanelChanged

Attaches event handler fnFunction to the activePanelChanged event of this sap.ui.vtm.Vtm.

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.vtm.Vtm itself.

Raised when the active panel has changed.

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.vtm.Vtm itself

attachInitialized

Attaches event handler fnFunction to the initialized event of this sap.ui.vtm.Vtm.

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.vtm.Vtm itself.

Raised when this sap.ui.vtm.Vtm instance and its extensions have been initialized.

Applications should add event handlers after the sap.ui.vtm.Vtm instance has initialized so that the extensions can attach event handlers before the application attempts to attach event handlers to the same events.

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.vtm.Vtm itself

attachPanelAdded

Attaches event handler fnFunction to the panelAdded event of this sap.ui.vtm.Vtm.

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.vtm.Vtm itself.

Raised when a panel has been added.

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.vtm.Vtm itself

createPanel

Creates a VTM panel associated with this sap.ui.vtm.Vtm instance.

Param Type DefaultValue Description
sId string

The ID to pass to the panel constructor.

mSettings object

The settings to pass to the panel constructor.

destroyExtensions

Destroys all the extensions in the aggregation extensions.

detachActivePanelChanged

Detaches event handler fnFunction from the activePanelChanged event of this sap.ui.vtm.Vtm.

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

detachInitialized

Detaches event handler fnFunction from the initialized event of this sap.ui.vtm.Vtm.

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

detachPanelAdded

Detaches event handler fnFunction from the panelAdded event of this sap.ui.vtm.Vtm.

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.vtm.Vtm.extend

Creates a new subclass of class sap.ui.vtm.Vtm 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.Element.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

fireActivePanelChanged

Fires event activePanelChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireInitialized

Fires event initialized to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

firePanelAdded

Fires event panelAdded to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

panel sap.ui.vtm.Panel

getActivePanel

Gets the active panel.

getAddDefaultExtensions

Gets current value of property addDefaultExtensions.

When true populates the extensions aggregation with the default set of extensions in the default configuration.

getExtensionByInterface

Gets the extension implementing a specified interface.

Returns undefined if there is not exactly one matching extension.

Param Type DefaultValue Description
sInterfaceName string

The fully qualified name of the interface.

getExtensionByName

Gets an extension with a specified class name.

Returns undefined if there is not exactly one matching extension.

Param Type DefaultValue Description
sExtensionName string

The fully qualified class name of the extension.

getExtensions

Gets content of aggregation extensions.

The set of VTM extensions. Extensions are used to provide extensibility. Default behaviors are implemented as extensions that can be replaced.

getExtensionsByInterface

Gets the extensions implementing a specified interface.

Param Type DefaultValue Description
sInterfaceName string

The fully qualified name of the interface.

getExtensionsByName

Gets the extensions with a specified class name.

Param Type DefaultValue Description
sExtensionName string

The fully qualified class name of the extension.

sap.ui.vtm.Vtm.getMetadata

Returns a metadata object for class sap.ui.vtm.Vtm.

getPanel

Gets a panel given its id. Returns undefined if no match is found.

Param Type DefaultValue Description
panelId string

The id of the panel to find.

getPanels

Gets the set of created panels. Do not modify the returned array.

getScene

Gets the scene.

indexOfExtension

Checks for the provided sap.ui.vtm.Extension in the aggregation extensions. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oExtension sap.ui.vtm.Extension

The extension whose index is looked for

insertExtension

Inserts a extension into the aggregation extensions.

Param Type DefaultValue Description
oExtension sap.ui.vtm.Extension

The extension to insert; if empty, nothing is inserted

iIndex int

The 0-based index the extension should be inserted at; for a negative value of iIndex, the extension is inserted at position 0; for a value greater than the current size of the aggregation, the extension is inserted at the last position

removeAllExtensions

Removes all the controls from the aggregation extensions.

Additionally, it unregisters them from the hosting UIArea.

removeExtension

Removes a extension from the aggregation extensions.

Param Type DefaultValue Description
vExtension int string sap.ui.vtm.Extension

The extension to remove or its index or id

setActivePanel

Sets the active panel.

Param Type DefaultValue Description
oActivePanel sap.ui.vtm.Panel

The active panel.

setAddDefaultExtensions

Sets a new value for property addDefaultExtensions.

When true populates the extensions aggregation with the default set of extensions in the default configuration.

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

Param Type DefaultValue Description
bAddDefaultExtensions boolean

New value for property addDefaultExtensions