class sap.f.ShellBar

Control sample: sap.f.ShellBar
Visiblity: public
UX Guidelines:
Implements: sap.f.IShellBarsap.m.IBarsap.tnt.IToolHeader
Available since: N/A
Module: sap/f/ShellBar
Application Component: CA-UI5-CTR

A horizontal bar control holding multiple child controls used as application shell header.

Overview

The ShellBar is used as the uppermost section (shell) of the app. It is fully responsive and adaptive, and corresponds to the SAP Fiori Design Guidelines.

Usage

Content specified in the ShellBar properties and aggregations is automatically positioned in dedicated places of the control.


Constructor

Constructor for a new ShellBar.

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.f.ShellBar(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
homeIcon sap.ui.core.URI empty string

Defines the URI to the home icon, such as company or product logo.

Visibility: public
homeIconTooltip string empty string

Defines a custom tooltip for the home icon. If not set, a default tooltip is used.

Since: 1.67.

Visibility: public
notificationsNumber string empty string

Defines the displayed number of upcoming notifications.

Since: 1.64.

Visibility: public
secondTitle string empty string

Defines the secondary title of the control.

Visibility: public
showCopilot boolean false

Determines whether the SAP CoPilot icon is displayed.

Visibility: public
showMenuButton boolean false

Determines whether a hamburger menu button is displayed (as an alternative if the menu aggregation is not used).

Visibility: public
showNavButton boolean false

Determines whether a back navigation button is displayed.

Visibility: public
showNotifications boolean false

Determines whether the notifications button is displayed.

Visibility: public
showProductSwitcher boolean false

Determines whether the product switcher button is displayed.

Visibility: public
showSearch boolean false

Determines whether the search button is displayed.

Visibility: public
title string empty string

Defines the main title of the control.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_additionalBox 0..1 sap.m.HBox

Holds the internally created HBox with text content.

_overflowToolbar 0..1 sap.m.OverflowToolbar

Holds the internally created OverflowToolbar.

additionalContent 0..n sap.f.IShellBar

Additional content to be displayed in the control.

Note: Only controls implementing the sap.f.IShellBar interface are allowed.

menu 0..1 sap.m.Menu

The menu attached to the main title.

profile 0..1 sap.m.Avatar

The profile avatar.

searchManager 0..1 sap.f.SearchManager

Configurable search.

Note: If showSearch is set to true, two search buttons appear.

Since: 1.67.


Events Overview

Event Description
avatarPressed

Fired when the profile avatar is pressed.

copilotPressed

Fired when the SAP CoPilot icon is pressed.

homeIconPressed

Fired when the homeIcon is pressed.

menuButtonPressed

Fired when the alternative menu button is pressed.

navButtonPressed

Fired when the navigation/back button is pressed.

notificationsPressed

Fired when the notifications button is pressed.

productSwitcherPressed

Fired when the product switcher button is pressed.

searchButtonPressed

Fired when the search button is pressed.

avatarPressed

Fired when the profile avatar is pressed.

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

Reference to the button that has been pressed

copilotPressed

Fired when the SAP CoPilot icon is pressed.

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

Reference to the button that has been pressed

homeIconPressed

Fired when the homeIcon is pressed.

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

Reference to the image that has been pressed

menuButtonPressed

Fired when the alternative menu button is pressed.

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

Reference to the button that has been pressed

navButtonPressed

Fired when the navigation/back button is pressed.

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

Reference to the button that has been pressed

notificationsPressed

Fired when the notifications button is pressed.

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

Reference to the button that has been pressed

productSwitcherPressed

Fired when the product switcher button is pressed.

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

Reference to the button that has been pressed

searchButtonPressed

Fired when the search button is pressed.

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

Reference to the button that has been pressed


Methods Overview

Method Description
_applyContextClassFor

Sets classes according to the context of the page. Possible contexts are header, footer, and subheader.

_applyTag

Sets the HTML tag according to the context of the page. Possible contexts are header, footer, and subheader.

addAdditionalContent

Adds some additionalContent to the aggregation additionalContent.

applyTagAndContextClassFor

Sets classes and HTML tag according to the context of the page. Possible contexts are header, footer, and subheader

attachAvatarPressed

Attaches event handler fnFunction to the avatarPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the profile avatar is pressed.

attachCopilotPressed

Attaches event handler fnFunction to the copilotPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the SAP CoPilot icon is pressed.

attachHomeIconPressed

Attaches event handler fnFunction to the homeIconPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the homeIcon is pressed.

attachMenuButtonPressed

Attaches event handler fnFunction to the menuButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the alternative menu button is pressed.

attachNavButtonPressed

Attaches event handler fnFunction to the navButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the navigation/back button is pressed.

attachNotificationsPressed

Attaches event handler fnFunction to the notificationsPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the notifications button is pressed.

attachProductSwitcherPressed

Attaches event handler fnFunction to the productSwitcherPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the product switcher button is pressed.

attachSearchButtonPressed

Attaches event handler fnFunction to the searchButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the search button is pressed.

destroyAdditionalContent

Destroys all the additionalContent in the aggregation additionalContent.

destroyMenu

Destroys the menu in the aggregation menu.

destroyProfile

Destroys the profile in the aggregation profile.

destroySearchManager

Destroys the searchManager in the aggregation searchManager.

detachAvatarPressed

Detaches event handler fnFunction from the avatarPressed event of this sap.f.ShellBar.

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

detachCopilotPressed

Detaches event handler fnFunction from the copilotPressed event of this sap.f.ShellBar.

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

detachHomeIconPressed

Detaches event handler fnFunction from the homeIconPressed event of this sap.f.ShellBar.

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

detachMenuButtonPressed

Detaches event handler fnFunction from the menuButtonPressed event of this sap.f.ShellBar.

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

detachNavButtonPressed

Detaches event handler fnFunction from the navButtonPressed event of this sap.f.ShellBar.

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

detachNotificationsPressed

Detaches event handler fnFunction from the notificationsPressed event of this sap.f.ShellBar.

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

detachProductSwitcherPressed

Detaches event handler fnFunction from the productSwitcherPressed event of this sap.f.ShellBar.

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

detachSearchButtonPressed

Detaches event handler fnFunction from the searchButtonPressed event of this sap.f.ShellBar.

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

sap.f.ShellBar.extend

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

fireAvatarPressed

Fires event avatarPressed to attached listeners.

fireCopilotPressed

Fires event copilotPressed to attached listeners.

fireHomeIconPressed

Fires event homeIconPressed to attached listeners.

fireMenuButtonPressed

Fires event menuButtonPressed to attached listeners.

fireNavButtonPressed

Fires event navButtonPressed to attached listeners.

fireNotificationsPressed

Fires event notificationsPressed to attached listeners.

fireProductSwitcherPressed

Fires event productSwitcherPressed to attached listeners.

fireSearchButtonPressed

Fires event searchButtonPressed to attached listeners.

getAdditionalContent

Gets content of aggregation additionalContent.

Additional content to be displayed in the control.

Note: Only controls implementing the sap.f.IShellBar interface are allowed.

getContext

Gets the available Bar contexts.

getHomeIcon

Gets current value of property homeIcon.

Defines the URI to the home icon, such as company or product logo.

Default value is empty string.

getHomeIconTooltip

Gets current value of property homeIconTooltip.

Defines a custom tooltip for the home icon. If not set, a default tooltip is used.

Default value is empty string.

getHTMLTag

Gets the HTML tag of the root DOM Reference.

getMenu

Gets content of aggregation menu.

The menu attached to the main title.

sap.f.ShellBar.getMetadata

Returns a metadata object for class sap.f.ShellBar.

getNotificationsNumber

Gets current value of property notificationsNumber.

Defines the displayed number of upcoming notifications.

Default value is empty string.

getProfile

Gets content of aggregation profile.

The profile avatar.

getSearchManager

Gets content of aggregation searchManager.

Configurable search.

Note: If showSearch is set to true, two search buttons appear.

getSecondTitle

Gets current value of property secondTitle.

Defines the secondary title of the control.

Default value is empty string.

getShowCopilot

Gets current value of property showCopilot.

Determines whether the SAP CoPilot icon is displayed.

Default value is false.

getShowMenuButton

Gets current value of property showMenuButton.

Determines whether a hamburger menu button is displayed (as an alternative if the menu aggregation is not used).

Default value is false.

getShowNavButton

Gets current value of property showNavButton.

Determines whether a back navigation button is displayed.

Default value is false.

getShowNotifications

Gets current value of property showNotifications.

Determines whether the notifications button is displayed.

Default value is false.

getShowProductSwitcher

Gets current value of property showProductSwitcher.

Determines whether the product switcher button is displayed.

Default value is false.

getShowSearch

Gets current value of property showSearch.

Determines whether the search button is displayed.

Default value is false.

getTitle

Gets current value of property title.

Defines the main title of the control.

Default value is empty string.

indexOfAdditionalContent

Checks for the provided sap.f.IShellBar in the aggregation additionalContent. and returns its index if found or -1 otherwise.

insertAdditionalContent

Inserts a additionalContent into the aggregation additionalContent.

isContextSensitive

Returns if the bar is sensitive to the container context. Implementation of the IBar interface

removeAdditionalContent

Removes a additionalContent from the aggregation additionalContent.

removeAllAdditionalContent

Removes all the controls from the aggregation additionalContent.

Additionally, it unregisters them from the hosting UIArea.

setHomeIcon

Sets a new value for property homeIcon.

Defines the URI to the home icon, such as company or product logo.

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

Default value is empty string.

setHomeIconTooltip

Sets a new value for property homeIconTooltip.

Defines a custom tooltip for the home icon. If not set, a default tooltip is used.

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

Default value is empty string.

setHTMLTag

Sets the HTML tag of the root DOM Reference.

setMenu

Sets the aggregated menu.

setProfile

Sets the aggregated profile.

setSearchManager

Sets the aggregated searchManager.

setSecondTitle

Sets a new value for property secondTitle.

Defines the secondary title of the control.

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

Default value is empty string.

setShowCopilot

Sets a new value for property showCopilot.

Determines whether the SAP CoPilot icon is displayed.

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

Default value is false.

setShowMenuButton

Sets a new value for property showMenuButton.

Determines whether a hamburger menu button is displayed (as an alternative if the menu aggregation is not used).

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

Default value is false.

setShowNavButton

Sets a new value for property showNavButton.

Determines whether a back navigation button is displayed.

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

Default value is false.

setShowNotifications

Sets a new value for property showNotifications.

Determines whether the notifications button is displayed.

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

Default value is false.

setShowProductSwitcher

Sets a new value for property showProductSwitcher.

Determines whether the product switcher button is displayed.

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

Default value is false.

setShowSearch

Sets a new value for property showSearch.

Determines whether the search button is displayed.

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

Default value is false.

setTitle

Sets a new value for property title.

Defines the main title of the control.

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

Default value is empty string.

_applyContextClassFor

Sets classes according to the context of the page. Possible contexts are header, footer, and subheader.

_applyTag

Sets the HTML tag according to the context of the page. Possible contexts are header, footer, and subheader.

addAdditionalContent

Adds some additionalContent to the aggregation additionalContent.

Param Type DefaultValue Description
oAdditionalContent sap.f.IShellBar

The additionalContent to add; if empty, nothing is inserted

applyTagAndContextClassFor

Sets classes and HTML tag according to the context of the page. Possible contexts are header, footer, and subheader

attachAvatarPressed

Attaches event handler fnFunction to the avatarPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the profile avatar is pressed.

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.f.ShellBar itself

attachCopilotPressed

Attaches event handler fnFunction to the copilotPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the SAP CoPilot icon is pressed.

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.f.ShellBar itself

attachHomeIconPressed

Attaches event handler fnFunction to the homeIconPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the homeIcon is pressed.

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.f.ShellBar itself

attachMenuButtonPressed

Attaches event handler fnFunction to the menuButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the alternative menu button is pressed.

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.f.ShellBar itself

attachNavButtonPressed

Attaches event handler fnFunction to the navButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the navigation/back button is pressed.

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.f.ShellBar itself

attachNotificationsPressed

Attaches event handler fnFunction to the notificationsPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the notifications button is pressed.

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.f.ShellBar itself

attachProductSwitcherPressed

Attaches event handler fnFunction to the productSwitcherPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the product switcher button is pressed.

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.f.ShellBar itself

attachSearchButtonPressed

Attaches event handler fnFunction to the searchButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar itself.

Fired when the search button is pressed.

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.f.ShellBar itself

destroyAdditionalContent

Destroys all the additionalContent in the aggregation additionalContent.

destroyMenu

Destroys the menu in the aggregation menu.

destroyProfile

Destroys the profile in the aggregation profile.

destroySearchManager

Destroys the searchManager in the aggregation searchManager.

detachAvatarPressed

Detaches event handler fnFunction from the avatarPressed event of this sap.f.ShellBar.

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

detachCopilotPressed

Detaches event handler fnFunction from the copilotPressed event of this sap.f.ShellBar.

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

detachHomeIconPressed

Detaches event handler fnFunction from the homeIconPressed event of this sap.f.ShellBar.

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

detachMenuButtonPressed

Detaches event handler fnFunction from the menuButtonPressed event of this sap.f.ShellBar.

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

detachNavButtonPressed

Detaches event handler fnFunction from the navButtonPressed event of this sap.f.ShellBar.

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

detachNotificationsPressed

Detaches event handler fnFunction from the notificationsPressed event of this sap.f.ShellBar.

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

detachProductSwitcherPressed

Detaches event handler fnFunction from the productSwitcherPressed event of this sap.f.ShellBar.

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

detachSearchButtonPressed

Detaches event handler fnFunction from the searchButtonPressed event of this sap.f.ShellBar.

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.f.ShellBar.extend

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

fireAvatarPressed

Fires event avatarPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

avatar sap.m.Avatar

Reference to the button that has been pressed

fireCopilotPressed

Fires event copilotPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

image sap.m.Image

Reference to the button that has been pressed

fireHomeIconPressed

Fires event homeIconPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

icon sap.m.Image

Reference to the image that has been pressed

fireMenuButtonPressed

Fires event menuButtonPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

button sap.m.Button

Reference to the button that has been pressed

fireNavButtonPressed

Fires event navButtonPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

button sap.m.Button

Reference to the button that has been pressed

fireNotificationsPressed

Fires event notificationsPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

button sap.m.Button

Reference to the button that has been pressed

fireProductSwitcherPressed

Fires event productSwitcherPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

button sap.m.Button

Reference to the button that has been pressed

fireSearchButtonPressed

Fires event searchButtonPressed to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

button sap.m.Button

Reference to the button that has been pressed

getAdditionalContent

Gets content of aggregation additionalContent.

Additional content to be displayed in the control.

Note: Only controls implementing the sap.f.IShellBar interface are allowed.

getContext

Gets the available Bar contexts.

getHomeIcon

Gets current value of property homeIcon.

Defines the URI to the home icon, such as company or product logo.

Default value is empty string.

getHomeIconTooltip

Gets current value of property homeIconTooltip.

Defines a custom tooltip for the home icon. If not set, a default tooltip is used.

Default value is empty string.

getHTMLTag

Gets the HTML tag of the root DOM Reference.

getMenu

Gets content of aggregation menu.

The menu attached to the main title.

sap.f.ShellBar.getMetadata

Returns a metadata object for class sap.f.ShellBar.

getNotificationsNumber

Gets current value of property notificationsNumber.

Defines the displayed number of upcoming notifications.

Default value is empty string.

getProfile

Gets content of aggregation profile.

The profile avatar.

getSearchManager

Gets content of aggregation searchManager.

Configurable search.

Note: If showSearch is set to true, two search buttons appear.

getSecondTitle

Gets current value of property secondTitle.

Defines the secondary title of the control.

Default value is empty string.

getShowCopilot

Gets current value of property showCopilot.

Determines whether the SAP CoPilot icon is displayed.

Default value is false.

getShowMenuButton

Gets current value of property showMenuButton.

Determines whether a hamburger menu button is displayed (as an alternative if the menu aggregation is not used).

Default value is false.

getShowNavButton

Gets current value of property showNavButton.

Determines whether a back navigation button is displayed.

Default value is false.

getShowNotifications

Gets current value of property showNotifications.

Determines whether the notifications button is displayed.

Default value is false.

getShowProductSwitcher

Gets current value of property showProductSwitcher.

Determines whether the product switcher button is displayed.

Default value is false.

getShowSearch

Gets current value of property showSearch.

Determines whether the search button is displayed.

Default value is false.

getTitle

Gets current value of property title.

Defines the main title of the control.

Default value is empty string.

indexOfAdditionalContent

Checks for the provided sap.f.IShellBar in the aggregation additionalContent. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAdditionalContent sap.f.IShellBar

The additionalContent whose index is looked for

insertAdditionalContent

Inserts a additionalContent into the aggregation additionalContent.

Param Type DefaultValue Description
oAdditionalContent sap.f.IShellBar

The additionalContent to insert; if empty, nothing is inserted

iIndex int

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

isContextSensitive

Returns if the bar is sensitive to the container context. Implementation of the IBar interface

removeAdditionalContent

Removes a additionalContent from the aggregation additionalContent.

Param Type DefaultValue Description
vAdditionalContent int string sap.f.IShellBar

The additionalContent to remove or its index or id

removeAllAdditionalContent

Removes all the controls from the aggregation additionalContent.

Additionally, it unregisters them from the hosting UIArea.

setHomeIcon

Sets a new value for property homeIcon.

Defines the URI to the home icon, such as company or product logo.

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

Default value is empty string.

Param Type DefaultValue Description
sHomeIcon sap.ui.core.URI ""

New value for property homeIcon

setHomeIconTooltip

Sets a new value for property homeIconTooltip.

Defines a custom tooltip for the home icon. If not set, a default tooltip is used.

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

Default value is empty string.

Param Type DefaultValue Description
sHomeIconTooltip string ""

New value for property homeIconTooltip

setHTMLTag

Sets the HTML tag of the root DOM Reference.

Param Type DefaultValue Description
sTag string

setMenu

Sets the aggregated menu.

Param Type DefaultValue Description
oMenu sap.m.Menu

The menu to set

setProfile

Sets the aggregated profile.

Param Type DefaultValue Description
oProfile sap.m.Avatar

The profile to set

setSearchManager

Sets the aggregated searchManager.

Param Type DefaultValue Description
oSearchManager sap.f.SearchManager

The searchManager to set

setSecondTitle

Sets a new value for property secondTitle.

Defines the secondary title of the control.

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

Default value is empty string.

Param Type DefaultValue Description
sSecondTitle string ""

New value for property secondTitle

setShowCopilot

Sets a new value for property showCopilot.

Determines whether the SAP CoPilot icon is displayed.

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

Default value is false.

Param Type DefaultValue Description
bShowCopilot boolean false

New value for property showCopilot

setShowMenuButton

Sets a new value for property showMenuButton.

Determines whether a hamburger menu button is displayed (as an alternative if the menu aggregation is not used).

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

Default value is false.

Param Type DefaultValue Description
bShowMenuButton boolean false

New value for property showMenuButton

setShowNavButton

Sets a new value for property showNavButton.

Determines whether a back navigation button is displayed.

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

Default value is false.

Param Type DefaultValue Description
bShowNavButton boolean false

New value for property showNavButton

setShowNotifications

Sets a new value for property showNotifications.

Determines whether the notifications button is displayed.

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

Default value is false.

Param Type DefaultValue Description
bShowNotifications boolean false

New value for property showNotifications

setShowProductSwitcher

Sets a new value for property showProductSwitcher.

Determines whether the product switcher button is displayed.

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

Default value is false.

Param Type DefaultValue Description
bShowProductSwitcher boolean false

New value for property showProductSwitcher

setShowSearch

Sets a new value for property showSearch.

Determines whether the search button is displayed.

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

Default value is false.

Param Type DefaultValue Description
bShowSearch boolean false

New value for property showSearch

setTitle

Sets a new value for property title.

Defines the main title of the control.

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

Default value is empty string.

Param Type DefaultValue Description
sTitle string ""

New value for property title