Class sap.ui.commons.ApplicationHeaderModule: sap/ui/commons/ApplicationHeader

extends Control

The application header control stands on the top of any application page. It consists of 4 areas: Logo area, Function area provided by application, Search area, Logout area.
Deprecated API:
Since version 1.38. Instead, use the sap.tnt.ToolHeader control.
Constructor Summary
new sap.ui.commons.ApplicationHeader(sId?, mSettings?)Constructor for a new ApplicationHeader.
Event Summary
logoff(oControlEvent)Fires an event to log off the user from the application.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.ApplicationHeader.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.ApplicationHeader with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.ApplicationHeader.getMetadata()Returns a metadata object for class sap.ui.commons.ApplicationHeader.
attachLogoff(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the logoff event of this sap.ui.commons.ApplicationHeader.
detachLogoff(fnFunction, oListener)Detaches event handler fnFunction from the logoff event of this sap.ui.commons.ApplicationHeader.
fireLogoff(mParameters?)Fires event logoff to attached listeners.
getDisplayLogoff()Gets current value of property displayLogoff.
getDisplayWelcome()Gets current value of property displayWelcome.
getLogoSrc()Gets current value of property logoSrc.
getLogoText()Gets current value of property logoText.
getUserName()Gets current value of property userName.
setDisplayLogoff(bDisplayLogoff)Sets a new value for property displayLogoff.
setDisplayWelcome(bDisplayWelcome)Sets a new value for property displayWelcome.
setLogoSrc(sLogoSrc)Sets a new value for property logoSrc.
setLogoText(sLogoText)Sets a new value for property logoText.
setUserName(sUserName)Sets a new value for property userName.
Constructor Detail
new sap.ui.commons.ApplicationHeader(sId?, mSettings?)

Constructor for a new ApplicationHeader.

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Event Detail
logoff(oControlEvent)
Fires an event to log off the user from the application. No parameters.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Method Detail
sap.ui.commons.ApplicationHeader.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.ui.commons.ApplicationHeader 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.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.commons.ApplicationHeader.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.ApplicationHeader.
Returns:
sap.ui.base.MetadataMetadata object describing this class
attachLogoff(oData?, fnFunction, oListener?): sap.ui.commons.ApplicationHeader

Attaches event handler fnFunction to the logoff event of this sap.ui.commons.ApplicationHeader.

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.commons.ApplicationHeader itself.

Fires an event to log off the user from the application. No parameters.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.commons.ApplicationHeader itself
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
detachLogoff(fnFunction, oListener): sap.ui.commons.ApplicationHeader

Detaches event handler fnFunction from the logoff event of this sap.ui.commons.ApplicationHeader.

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

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
fireLogoff(mParameters?): sap.ui.commons.ApplicationHeader
Fires event logoff to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
getDisplayLogoff(): boolean

Gets current value of property displayLogoff.

Determines if the logoff area will be displayed at the right hand side of the application header.

Default value is true.

Returns:
booleanValue of property displayLogoff
getDisplayWelcome(): boolean

Gets current value of property displayWelcome.

Determines if the welcome text is displayed

Default value is true.

Returns:
booleanValue of property displayWelcome
getLogoSrc(): sap.ui.core.URI

Gets current value of property logoSrc.

Path (src) to the logo icon to be displayed in the application header.

Returns:
sap.ui.core.URIValue of property logoSrc
getLogoText(): string

Gets current value of property logoText.

The text that will be displayed beside the logo in the application header. This property is optional.

Returns:
stringValue of property logoText
getUserName(): string

Gets current value of property userName.

User name that will be displayed beside the welcome text

Returns:
stringValue of property userName
setDisplayLogoff(bDisplayLogoff): sap.ui.commons.ApplicationHeader

Sets a new value for property displayLogoff.

Determines if the logoff area will be displayed at the right hand side of the application header.

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

Default value is true.

Parameters:
booleanbDisplayLogoffNew value for property displayLogoff
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
setDisplayWelcome(bDisplayWelcome): sap.ui.commons.ApplicationHeader

Sets a new value for property displayWelcome.

Determines if the welcome text is displayed

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

Default value is true.

Parameters:
booleanbDisplayWelcomeNew value for property displayWelcome
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
setLogoSrc(sLogoSrc): sap.ui.commons.ApplicationHeader

Sets a new value for property logoSrc.

Path (src) to the logo icon to be displayed in the application header.

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

Parameters:
sap.ui.core.URIsLogoSrcNew value for property logoSrc
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
setLogoText(sLogoText): sap.ui.commons.ApplicationHeader

Sets a new value for property logoText.

The text that will be displayed beside the logo in the application header. This property is optional.

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

Parameters:
stringsLogoTextNew value for property logoText
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining
setUserName(sUserName): sap.ui.commons.ApplicationHeader

Sets a new value for property userName.

User name that will be displayed beside the welcome text

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

Parameters:
stringsUserNameNew value for property userName
Returns:
sap.ui.commons.ApplicationHeaderReference to this in order to allow method chaining