Displays general information in the header of the sap.f.Card.
You can configure the title, subtitle, status text and icon, using the provided properties.
Notes:
Constructor for a new Header
.
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.cards.Header(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 |
---|---|---|---|
iconAlt | string | empty string | Defines an alt text for the avatar or icon. Visibility: public |
iconBackgroundColor | sap.m.AvatarColor | Transparent | Defines a background color for the avatar or icon. Visibility: public |
iconDisplayShape | sap.m.AvatarShape | Circle | Defines the shape of the icon. Visibility: public |
iconInitials | string | empty string | Defines the initials of the icon. Visibility: public |
iconSrc | sap.ui.core.URI | empty string | Defines the icon source. Visibility: public |
statusText | string | empty string | Defines the status text. Visibility: public |
subtitle | string | empty string | Defines the subtitle. Visibility: public |
title | string | empty string | Defines the title. Visibility: public |
Name | Type | Default Value | Description |
---|---|---|---|
dataTimestamp | string | empty string | Defines the timestamp of the oldest data in the card. Use this to show to the end user how fresh the information in the card is. Must be specified in ISO 8601 format. Will be shown as a relative time like "5 minutes ago". Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_avatar | 0..1 | sap.m.Avatar |
Defines the inner avatar control. |
_subtitle | 0..1 | sap.m.Text |
Defines the inner subtitle control. |
_title | 0..1 | sap.m.Text |
Defines the inner title control. |
Name | Cardinality | Type | Description |
---|---|---|---|
toolbar | 0..1 | sap.ui.core.Control |
Defines the toolbar. |
Method | Description |
---|---|
attachPress |
Attaches event handler When called, the context of the event handler (its Fires when the user presses the control. |
detachPress |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.f.cards.Header.extend |
Creates a new subclass of class sap.f.cards.Header with name
|
firePress |
Fires event press to attached listeners. |
getIconAlt |
Gets current value of property iconAlt. Defines an alt text for the avatar or icon. Default value is |
getIconBackgroundColor |
Gets current value of property iconBackgroundColor. Defines a background color for the avatar or icon. Default value is |
getIconDisplayShape |
Gets current value of property iconDisplayShape. Defines the shape of the icon. Default value is |
getIconInitials |
Gets current value of property iconInitials. Defines the initials of the icon. Default value is |
getIconSrc |
Gets current value of property iconSrc. Defines the icon source. Default value is |
sap.f.cards.Header.getMetadata |
Returns a metadata object for class sap.f.cards.Header. |
getStatusText |
Gets current value of property statusText. Defines the status text. Default value is |
getSubtitle |
Gets current value of property subtitle. Defines the subtitle. Default value is |
getTitle |
Gets current value of property title. Defines the title. Default value is |
setIconAlt |
Sets a new value for property iconAlt. Defines an alt text for the avatar or icon. When called with a value of Default value is |
setIconBackgroundColor |
Sets a new value for property iconBackgroundColor. Defines a background color for the avatar or icon. When called with a value of Default value is |
setIconDisplayShape |
Sets a new value for property iconDisplayShape. Defines the shape of the icon. When called with a value of Default value is |
setIconInitials |
Sets a new value for property iconInitials. Defines the initials of the icon. When called with a value of Default value is |
setIconSrc |
Sets a new value for property iconSrc. Defines the icon source. When called with a value of Default value is |
setStatusText |
Sets a new value for property statusText. Defines the status text. When called with a value of Default value is |
setSubtitle |
Sets a new value for property subtitle. Defines the subtitle. When called with a value of Default value is |
setTitle |
Sets a new value for property title. Defines the title. When called with a value of Default value is |
Attaches event handler fnFunction
to the press event of this sap.f.cards.Header
.
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.cards.Header
itself.
Fires when the user presses the control.
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 press event of this sap.f.cards.Header
.
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.f.cards.Header with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.f.cards.BaseHeader.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 press to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Gets current value of property iconAlt.
Defines an alt text for the avatar or icon.
Default value is empty string
.
Gets current value of property iconBackgroundColor.
Defines a background color for the avatar or icon.
Default value is Transparent
.
Gets current value of property iconDisplayShape.
Defines the shape of the icon.
Default value is Circle
.
Gets current value of property iconInitials.
Defines the initials of the icon.
Default value is empty string
.
Gets current value of property iconSrc.
Defines the icon source.
Default value is empty string
.
Gets current value of property statusText.
Defines the status text.
Default value is empty string
.
Gets current value of property subtitle.
Defines the subtitle.
Default value is empty string
.
Sets a new value for property iconAlt.
Defines an alt text for the avatar or icon.
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 |
---|---|---|---|
sIconAlt | string | "" |
New value for property |
Sets a new value for property iconBackgroundColor.
Defines a background color for the avatar or icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Transparent
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconBackgroundColor | sap.m.AvatarColor | Transparent |
New value for property |
Sets a new value for property iconDisplayShape.
Defines the shape of the icon.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Circle
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sIconDisplayShape | sap.m.AvatarShape | Circle |
New value for property |
Sets a new value for property iconInitials.
Defines the initials of the icon.
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 |
---|---|---|---|
sIconInitials | string | "" |
New value for property |
Sets a new value for property iconSrc.
Defines the icon source.
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 |
---|---|---|---|
sIconSrc | sap.ui.core.URI | "" |
New value for property |
Sets a new value for property statusText.
Defines the status text.
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 |
---|---|---|---|
sStatusText | string | "" |
New value for property |
Sets a new value for property subtitle.
Defines the subtitle.
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 |
---|---|---|---|
sSubtitle | string | "" |
New value for property |
Sets a new value for property title.
Defines the title.
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 |