The ToolPage is a layout control, used to create a basic tools app that has a header, side navigation and contents area.
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.
The main usage of the sap.tnt controls is for scenarios in the tooling or administration space.
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 |
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. |
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
|
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 Default value is |
getSubHeader |
Gets content of aggregation subHeader. The control to appear in the subheader area. |
indexOfMainContent |
Checks for the provided |
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. |
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 |
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 |
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
.
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 |
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 |
Removes all the controls from the aggregation mainContents.
Additionally, it unregisters them from the hosting UIArea.
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 |
Sets the aggregated header.
Param | Type | DefaultValue | Description |
---|---|---|---|
oHeader | sap.tnt.IToolHeader |
The header to set |
Sets the aggregated sideContent.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSideContent | sap.tnt.SideNavigation |
The sideContent to set |
Sets the expand/collapse state of the SideContent.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSideExpanded | boolean |
defines whether the SideNavigation is expanded. |
Sets the aggregated subHeader.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSubHeader | sap.tnt.IToolHeader |
The subHeader to set |