class sap.ui.unified.Shell

Control sample: sap.ui.unified.Shell
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/unified/Shell
Application Component: CA-UI5-TBL

The shell control is meant as root control (full-screen) of an application. It was build as root control of the Fiori Launchpad application and provides the basic capabilities for this purpose. Do not use this control within applications which run inside the Fiori Lauchpad and do not use it for other scenarios than the root control usecase.


Constructor

Constructor for a new Shell.

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.unified.Shell(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
icon sap.ui.core.URI

The application icon. If a custom header is set this property has no effect.

Visibility: public
searchVisible boolean true

If set to false, the search area (aggregation 'search') is hidden. If a custom header is set this property has no effect.

Since: 1.18.

Visibility: public
showCurtain boolean

Shows / Hides the curtain.

Visibility: public
showCurtainPane boolean

Shows / Hides the side pane on the curtain.

Visibility: public

Borrowed Properties

Name Type Default Value Description
headerHiding boolean false

Whether the header can be hidden (manually or automatically). This feature is only available when touch events are supported.

Visibility: public
headerVisible boolean true

If set to false, no header (and no items, search, ...) is shown.

Visibility: public
showPane boolean false

Shows / Hides the side pane.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
curtainContent 0..n sap.ui.core.Control

The content to appear in the curtain area.

curtainPaneContent 0..n sap.ui.core.Control

The content to appear in the pane area of the curtain.

headEndItems 0..n sap.ui.unified.ShellHeadItem

The buttons shown in the end (right in left-to-right case) of the Shell header. Currently max. 3 visible buttons are supported (when user is set only 1). If a custom header is set this aggregation has no effect.

headItems 0..n sap.ui.unified.ShellHeadItem

The buttons shown in the begin (left in left-to-right case) of the Shell header. Currently max. 3 visible buttons are supported. If a custom header is set this aggregation has no effect.

search 0..1 sap.ui.core.Control

Experimental (This aggregation might change in future!): The search control which should be displayed in the shell header. If a custom header is set this aggregation has no effect.

user 0..1 sap.ui.unified.ShellHeadUserItem

The user item which is rendered in the shell header beside the items. If a custom header is set this aggregation has no effect.

Since: 1.22.0.

Borrowed Aggregations

Name Cardinality Type Description
content 0..n sap.ui.core.Control

The content to appear in the main canvas.

header 0..1 sap.ui.core.Control

The control to appear in the header area.

paneContent 0..n sap.ui.core.Control

The content to appear in the pane area.


Methods Overview

Method Description
addCurtainContent

Adds some curtainContent to the aggregation curtainContent.

addCurtainPaneContent

Adds some curtainPaneContent to the aggregation curtainPaneContent.

addHeadEndItem

Adds some headEndItem to the aggregation headEndItems.

addHeadItem

Adds some headItem to the aggregation headItems.

destroyCurtainContent

Destroys all the curtainContent in the aggregation curtainContent.

destroyCurtainPaneContent

Destroys all the curtainPaneContent in the aggregation curtainPaneContent.

destroyHeadEndItems

Destroys all the headEndItems in the aggregation headEndItems.

destroyHeader

Destroys the header in the aggregation named header, but only if a custom header is set. The default header can not be destroyed.

destroyHeadItems

Destroys all the headItems in the aggregation headItems.

destroySearch

Destroys the search in the aggregation search.

destroyUser

Destroys the user in the aggregation user.

sap.ui.unified.Shell.extend

Creates a new subclass of class sap.ui.unified.Shell 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.unified.ShellLayout.extend.

getCurtainContent

Gets content of aggregation curtainContent.

The content to appear in the curtain area.

getCurtainPaneContent

Gets content of aggregation curtainPaneContent.

The content to appear in the pane area of the curtain.

getHeadEndItems

Gets content of aggregation headEndItems.

The buttons shown in the end (right in left-to-right case) of the Shell header. Currently max. 3 visible buttons are supported (when user is set only 1). If a custom header is set this aggregation has no effect.

getHeadItems

Gets content of aggregation headItems.

The buttons shown in the begin (left in left-to-right case) of the Shell header. Currently max. 3 visible buttons are supported. If a custom header is set this aggregation has no effect.

getIcon

Gets current value of property icon.

The application icon. If a custom header is set this property has no effect.

sap.ui.unified.Shell.getMetadata

Returns a metadata object for class sap.ui.unified.Shell.

getSearch

Gets content of aggregation search.

Experimental (This aggregation might change in future!): The search control which should be displayed in the shell header. If a custom header is set this aggregation has no effect.

getSearchVisible

Gets current value of property searchVisible.

If set to false, the search area (aggregation 'search') is hidden. If a custom header is set this property has no effect.

Default value is true.

getShowCurtain

Gets current value of property showCurtain.

Shows / Hides the curtain.

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.
getShowCurtainPane

Gets current value of property showCurtainPane.

Shows / Hides the side pane on the curtain.

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.
getUser

Gets content of aggregation user.

The user item which is rendered in the shell header beside the items. If a custom header is set this aggregation has no effect.

indexOfCurtainContent

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

indexOfCurtainPaneContent

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

indexOfHeadEndItem

Checks for the provided sap.ui.unified.ShellHeadItem in the aggregation headEndItems. and returns its index if found or -1 otherwise.

indexOfHeadItem

Checks for the provided sap.ui.unified.ShellHeadItem in the aggregation headItems. and returns its index if found or -1 otherwise.

insertCurtainContent

Inserts a curtainContent into the aggregation curtainContent.

insertCurtainPaneContent

Inserts a curtainPaneContent into the aggregation curtainPaneContent.

insertHeadEndItem

Inserts a headEndItem into the aggregation headEndItems.

insertHeadItem

Inserts a headItem into the aggregation headItems.

removeAllCurtainContent

Removes all the controls from the aggregation curtainContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllCurtainPaneContent

Removes all the controls from the aggregation curtainPaneContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeadEndItems

Removes all the controls from the aggregation headEndItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeadItems

Removes all the controls from the aggregation headItems.

Additionally, it unregisters them from the hosting UIArea.

removeCurtainContent

Removes a curtainContent from the aggregation curtainContent.

removeCurtainPaneContent

Removes a curtainPaneContent from the aggregation curtainPaneContent.

removeHeadEndItem

Removes a headEndItem from the aggregation headEndItems.

removeHeadItem

Removes a headItem from the aggregation headItems.

setHeader

Setter for the aggregated header.

setIcon

Sets a new value for property icon.

The application icon. If a custom header is set this property has no effect.

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

setSearch

Sets the aggregated search.

setSearchVisible

Sets a new value for property searchVisible.

If set to false, the search area (aggregation 'search') is hidden. If a custom header is set this property has no effect.

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

Default value is true.

setShowCurtain

Sets a new value for property showCurtain.

Shows / Hides the curtain.

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

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.
setShowCurtainPane

Sets a new value for property showCurtainPane.

Shows / Hides the side pane on the curtain.

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

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.
setUser

Sets the aggregated user.

addCurtainContent

Adds some curtainContent to the aggregation curtainContent.

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

The curtainContent to add; if empty, nothing is inserted

addCurtainPaneContent

Adds some curtainPaneContent to the aggregation curtainPaneContent.

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

The curtainPaneContent to add; if empty, nothing is inserted

addHeadEndItem

Adds some headEndItem to the aggregation headEndItems.

Param Type DefaultValue Description
oHeadEndItem sap.ui.unified.ShellHeadItem

The headEndItem to add; if empty, nothing is inserted

addHeadItem

Adds some headItem to the aggregation headItems.

Param Type DefaultValue Description
oHeadItem sap.ui.unified.ShellHeadItem

The headItem to add; if empty, nothing is inserted

destroyCurtainContent

Destroys all the curtainContent in the aggregation curtainContent.

destroyCurtainPaneContent

Destroys all the curtainPaneContent in the aggregation curtainPaneContent.

destroyHeadEndItems

Destroys all the headEndItems in the aggregation headEndItems.

destroyHeader

Destroys the header in the aggregation named header, but only if a custom header is set. The default header can not be destroyed.

destroyHeadItems

Destroys all the headItems in the aggregation headItems.

destroySearch

Destroys the search in the aggregation search.

destroyUser

Destroys the user in the aggregation user.

sap.ui.unified.Shell.extend

Creates a new subclass of class sap.ui.unified.Shell 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.unified.ShellLayout.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

getCurtainContent

Gets content of aggregation curtainContent.

The content to appear in the curtain area.

getCurtainPaneContent

Gets content of aggregation curtainPaneContent.

The content to appear in the pane area of the curtain.

getHeadEndItems

Gets content of aggregation headEndItems.

The buttons shown in the end (right in left-to-right case) of the Shell header. Currently max. 3 visible buttons are supported (when user is set only 1). If a custom header is set this aggregation has no effect.

getHeadItems

Gets content of aggregation headItems.

The buttons shown in the begin (left in left-to-right case) of the Shell header. Currently max. 3 visible buttons are supported. If a custom header is set this aggregation has no effect.

getIcon

Gets current value of property icon.

The application icon. If a custom header is set this property has no effect.

sap.ui.unified.Shell.getMetadata

Returns a metadata object for class sap.ui.unified.Shell.

getSearch

Gets content of aggregation search.

Experimental (This aggregation might change in future!): The search control which should be displayed in the shell header. If a custom header is set this aggregation has no effect.

getSearchVisible

Gets current value of property searchVisible.

If set to false, the search area (aggregation 'search') is hidden. If a custom header is set this property has no effect.

Default value is true.

getShowCurtain

Gets current value of property showCurtain.

Shows / Hides the curtain.

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.

getShowCurtainPane

Gets current value of property showCurtainPane.

Shows / Hides the side pane on the curtain.

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.

getUser

Gets content of aggregation user.

The user item which is rendered in the shell header beside the items. If a custom header is set this aggregation has no effect.

indexOfCurtainContent

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

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

The curtainContent whose index is looked for

indexOfCurtainPaneContent

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

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

The curtainPaneContent whose index is looked for

indexOfHeadEndItem

Checks for the provided sap.ui.unified.ShellHeadItem in the aggregation headEndItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oHeadEndItem sap.ui.unified.ShellHeadItem

The headEndItem whose index is looked for

indexOfHeadItem

Checks for the provided sap.ui.unified.ShellHeadItem in the aggregation headItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oHeadItem sap.ui.unified.ShellHeadItem

The headItem whose index is looked for

insertCurtainContent

Inserts a curtainContent into the aggregation curtainContent.

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

The curtainContent to insert; if empty, nothing is inserted

iIndex int

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

insertCurtainPaneContent

Inserts a curtainPaneContent into the aggregation curtainPaneContent.

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

The curtainPaneContent to insert; if empty, nothing is inserted

iIndex int

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

insertHeadEndItem

Inserts a headEndItem into the aggregation headEndItems.

Param Type DefaultValue Description
oHeadEndItem sap.ui.unified.ShellHeadItem

The headEndItem to insert; if empty, nothing is inserted

iIndex int

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

insertHeadItem

Inserts a headItem into the aggregation headItems.

Param Type DefaultValue Description
oHeadItem sap.ui.unified.ShellHeadItem

The headItem to insert; if empty, nothing is inserted

iIndex int

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

removeAllCurtainContent

Removes all the controls from the aggregation curtainContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllCurtainPaneContent

Removes all the controls from the aggregation curtainPaneContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeadEndItems

Removes all the controls from the aggregation headEndItems.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeadItems

Removes all the controls from the aggregation headItems.

Additionally, it unregisters them from the hosting UIArea.

removeCurtainContent

Removes a curtainContent from the aggregation curtainContent.

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

The curtainContent to remove or its index or id

removeCurtainPaneContent

Removes a curtainPaneContent from the aggregation curtainPaneContent.

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

The curtainPaneContent to remove or its index or id

removeHeadEndItem

Removes a headEndItem from the aggregation headEndItems.

Param Type DefaultValue Description
vHeadEndItem int string sap.ui.unified.ShellHeadItem

The headEndItem to remove or its index or id

removeHeadItem

Removes a headItem from the aggregation headItems.

Param Type DefaultValue Description
vHeadItem int string sap.ui.unified.ShellHeadItem

The headItem to remove or its index or id

setHeader

Setter for the aggregated header.

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

The Control which should be rendered within the Shell header or null to render the default Shell header.

setIcon

Sets a new value for property icon.

The application icon. If a custom header is set this property has no effect.

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

Param Type DefaultValue Description
sIcon sap.ui.core.URI

New value for property icon

setSearch

Sets the aggregated search.

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

The search to set

setSearchVisible

Sets a new value for property searchVisible.

If set to false, the search area (aggregation 'search') is hidden. If a custom header is set this property has no effect.

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

Default value is true.

Param Type DefaultValue Description
bSearchVisible boolean true

New value for property searchVisible

setShowCurtain

Sets a new value for property showCurtain.

Shows / Hides the curtain.

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

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.
Param Type DefaultValue Description
bShowCurtain boolean

New value for property showCurtain

setShowCurtainPane

Sets a new value for property showCurtainPane.

Shows / Hides the side pane on the curtain.

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

Since 1.16.3 Curtain is deprecated and replaced by ShellOverlay mechanism.
Param Type DefaultValue Description
bShowCurtainPane boolean

New value for property showCurtainPane

setUser

Sets the aggregated user.

Param Type DefaultValue Description
oUser sap.ui.unified.ShellHeadUserItem

The user to set