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.
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#constructor for a general description of the syntax of the settings object.
new sap.ui.commons.ApplicationHeader(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 |
Name | Type | Default Value | Description |
---|---|---|---|
displayLogoff | boolean | true | Determines if the logoff area will be displayed at the right hand side of the application header. Visibility: public |
displayWelcome | boolean | true | Determines if the welcome text is displayed Visibility: public |
logoSrc | sap.ui.core.URI | Path (src) to the logo icon to be displayed in the application header. Visibility: public |
|
logoText | string | The text that will be displayed beside the logo in the application header. This property is optional. Visibility: public |
|
userName | string | User name that will be displayed beside the welcome text Visibility: public |
Event | Description |
---|---|
logoff |
Fires an event to log off the user from the application. No parameters. |
Method | Description |
---|---|
attachLogoff |
Attaches event handler When called, the context of the event handler (its Fires an event to log off the user from the application. No parameters. |
detachLogoff |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.commons.ApplicationHeader.extend |
Creates a new subclass of class sap.ui.commons.ApplicationHeader with name
|
fireLogoff |
Fires event logoff to attached listeners. |
getDisplayLogoff |
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 |
getDisplayWelcome |
Gets current value of property displayWelcome. Determines if the welcome text is displayed Default value is |
getLogoSrc |
Gets current value of property logoSrc. Path (src) to the logo icon to be displayed in the application header. |
getLogoText |
Gets current value of property logoText. The text that will be displayed beside the logo in the application header. This property is optional. |
sap.ui.commons.ApplicationHeader.getMetadata |
Returns a metadata object for class sap.ui.commons.ApplicationHeader. |
getUserName |
Gets current value of property userName. User name that will be displayed beside the welcome text |
setDisplayLogoff |
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 Default value is |
setDisplayWelcome |
Sets a new value for property displayWelcome. Determines if the welcome text is displayed When called with a value of Default value is |
setLogoSrc |
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 |
setLogoText |
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 |
setUserName |
Sets a new value for property userName. User name that will be displayed beside the welcome text When called with a value of |
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.
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 |
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.
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 |
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.
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 |
Fires event logoff to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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
.
Gets current value of property displayWelcome.
Determines if the welcome text is displayed
Default value is true
.
Gets current value of property logoSrc.
Path (src) to the logo icon to be displayed in the application header.
Gets current value of property logoText.
The text that will be displayed beside the logo in the application header. This property is optional.
Returns a metadata object for class sap.ui.commons.ApplicationHeader.
Gets current value of property userName.
User name that will be displayed beside the welcome text
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bDisplayLogoff | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bDisplayWelcome | boolean | true |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sLogoSrc | sap.ui.core.URI |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sLogoText | string |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sUserName | string |
New value for property |