class sap.tnt.ToolPage

Control sample: sap.tnt.ToolPage
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/tnt/ToolPage
Application Component: CA-UI5-CTR

The ToolPage is a layout control, used to create a basic tools app that has a header, side navigation and contents area.

Overview

The control has three main areas - a header on top, navigation to the side and a content area that can hold any control. The header and side navigation use custom controls - sap.tnt.ToolHeader and sap.tnt.SideNavigation.

Usage

The main usage of the sap.tnt controls is for scenarios in the tooling or administration space.


Constructor

Constructor for a new ToolPage.

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.tnt.ToolPage(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
sideExpanded boolean true

Indicates if the side menu is expanded. Overrides the expanded property of the sideContent aggregation.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
header 0..1 sap.tnt.IToolHeader

The control to appear in the header area.

mainContents 0..n sap.ui.core.Control

The content section.

sideContent 0..1 sap.tnt.SideNavigation

The side menu of the layout.

subHeader 0..1 sap.tnt.IToolHeader

The control to appear in the subheader area.

Since: 1.93.


Methods Overview

Method Description
addMainContent

Adds some mainContent to the aggregation mainContents.

destroyHeader

Destroys the header in the aggregation header.

destroyMainContents

Destroys all the mainContents in the aggregation mainContents.

destroySideContent

Destroys the sideContent in the aggregation sideContent.

destroySubHeader

Destroys the subHeader in the aggregation subHeader.

sap.tnt.ToolPage.extend

Creates a new subclass of class sap.tnt.ToolPage 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.

getHeader

Gets content of aggregation header.

The control to appear in the header area.

getMainContents

Gets content of aggregation mainContents.

The content section.

sap.tnt.ToolPage.getMetadata

Returns a metadata object for class sap.tnt.ToolPage.

getSideContent

Gets content of aggregation sideContent.

The side menu of the layout.

getSideExpanded

Gets current value of property sideExpanded.

Indicates if the side menu is expanded. Overrides the expanded property of the sideContent aggregation.

Default value is true.

getSubHeader

Gets content of aggregation subHeader.

The control to appear in the subheader area.

indexOfMainContent

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

insertMainContent

Inserts a mainContent into the aggregation mainContents.

removeAllMainContents

Removes all the controls from the aggregation mainContents.

Additionally, it unregisters them from the hosting UIArea.

removeMainContent

Removes a mainContent from the aggregation mainContents.

setHeader

Sets the aggregated header.

setSideContent

Sets the aggregated sideContent.

setSideExpanded

Sets the expand/collapse state of the SideContent.

setSubHeader

Sets the aggregated subHeader.

toggleSideContentMode

Toggles the expand/collapse state of the SideContent.

addMainContent

Adds some mainContent to the aggregation mainContents.

Param Type DefaultValue Description
oMainContent sap.ui.core.Control

The mainContent to add; if empty, nothing is inserted

destroyHeader

Destroys the header in the aggregation header.

destroyMainContents

Destroys all the mainContents in the aggregation mainContents.

destroySideContent

Destroys the sideContent in the aggregation sideContent.

destroySubHeader

Destroys the subHeader in the aggregation subHeader.

sap.tnt.ToolPage.extend

Creates a new subclass of class sap.tnt.ToolPage 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

getHeader

Gets content of aggregation header.

The control to appear in the header area.

getMainContents

Gets content of aggregation mainContents.

The content section.

sap.tnt.ToolPage.getMetadata

Returns a metadata object for class sap.tnt.ToolPage.

getSideContent

Gets content of aggregation sideContent.

The side menu of the layout.

getSideExpanded

Gets current value of property sideExpanded.

Indicates if the side menu is expanded. Overrides the expanded property of the sideContent aggregation.

Default value is true.

getSubHeader

Gets content of aggregation subHeader.

The control to appear in the subheader area.

indexOfMainContent

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

Param Type DefaultValue Description
oMainContent sap.ui.core.Control

The mainContent whose index is looked for

insertMainContent

Inserts a mainContent into the aggregation mainContents.

Param Type DefaultValue Description
oMainContent sap.ui.core.Control

The mainContent to insert; if empty, nothing is inserted

iIndex int

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

removeAllMainContents

Removes all the controls from the aggregation mainContents.

Additionally, it unregisters them from the hosting UIArea.

removeMainContent

Removes a mainContent from the aggregation mainContents.

Param Type DefaultValue Description
vMainContent int string sap.ui.core.Control

The mainContent to remove or its index or id

setHeader

Sets the aggregated header.

Param Type DefaultValue Description
oHeader sap.tnt.IToolHeader

The header to set

setSideContent

Sets the aggregated sideContent.

Param Type DefaultValue Description
oSideContent sap.tnt.SideNavigation

The sideContent to set

setSideExpanded

Sets the expand/collapse state of the SideContent.

Param Type DefaultValue Description
bSideExpanded boolean

defines whether the SideNavigation is expanded.

setSubHeader

Sets the aggregated subHeader.

Param Type DefaultValue Description
oSubHeader sap.tnt.IToolHeader

The subHeader to set

toggleSideContentMode

Toggles the expand/collapse state of the SideContent.