class sap.m.ObjectHeader

Control sample: sap.m.ObjectHeader
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/ObjectHeader
Application Component: CA-UI5-CTR

ObjectHeader is a display control that enables the user to easily identify a specific object. The object header title is the key identifier of the object and additional text and icons can be used to further distinguish it from other objects.

Responsive behavior

When using the sap.m.ObjectHeader in SAP Quartz theme, the breakpoints and layout paddings could be automatically determined by the container's width. To enable this concept and implement responsive padding to the ObjectHeader control, add the following class: sapUiResponsivePadding--header.

This control can be a drop target.

Constructor

Constructor for a new ObjectHeader.

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.m.ObjectHeader(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
backgroundDesign sap.m.BackgroundDesign

Determines the background color of the ObjectHeader.

Note: The different types of ObjectHeader come with different default background:

  • non responsive - Transparent
  • responsive - Translucent
  • condensed - Solid

Visibility: public
condensed boolean false

ObjectHeader with title, one attribute, number, and number unit.

Note: Only applied if the responsive property is set to false.

Visibility: public
fullScreenOptimized boolean false

Optimizes the display of the elements of the ObjectHeader.

Set this property to true if your app uses a fullscreen layout (as opposed to a master-detail or other split-screen layout).

Note: Only applied if the responsive property is also set to true.

If set to true, the following situations apply:

  • On desktop, 1-3 attributes/statuses - positioned as a third block on the right side of the Title/Number group
  • On desktop, 4+ attributes/statuses - 4 columns below the Title/Number
  • On tablet (portrait mode), always in 2 columns below the Title/Number
  • On tablet (landscape mode), 1-2 attributes/statuses - 2 columns below the Title/Number
  • On tablet (landscape mode), 3+ attributes/statuses - 3 columns below the Title/Number
On phone, the attributes and statuses are always positioned in 1 column below the Title/Number of the ObjectHeader.

If set to false, the attributes and statuses are being positioned below the Title/Number of the ObjectHeader in 2 or 3 columns depending on their number:

  • On desktop, 1-4 attributes/statuses - 2 columns
  • On desktop, 5+ attributes/statuses - 3 columns
  • On tablet, always in 2 columns


Since: 1.28.

Visibility: public
icon sap.ui.core.URI

Defines the icon of the ObjectHeader.

Note: Recursive resolution of binding expressions is not supported by the framework. It works only in ObjectHeader, since it is a composite control and creates an Image control internally.

Visibility: public
iconActive boolean

Determines whether the ObjectHeader icon is clickable.

Visibility: public
iconAlt string

Determines the alternative text of the ObjectHeader icon. The text is displayed if the image for the icon is not available, or cannot be displayed.

Note: Provide an empty string value for the iconAlt property in case you want to use the icon for decoration only.

Visibility: public
iconDensityAware boolean true

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is the key for the application, set this value to false.

Visibility: public
iconTooltip string

Determines the tooltip text of the ObjectHeader icon.

Visibility: public
imageShape sap.m.ObjectHeaderPictureShape Square

Determines whether the picture should be displayed in a square or with a circle-shaped mask just like in sap.uxap.ObjectPageHeader.

Note: This property takes effect only on Images and it is ignored for Icons.

Since: 1.61.

Visibility: public
intro string

Determines the introductory text for the ObjectHeader.

Visibility: public
introActive boolean

Determines whether the introductory text of the ObjectHeader is clickable.

Visibility: public
introHref sap.ui.core.URI

Determines the intro link target URI. Supports standard hyperlink behavior. If an action should be triggered, this should not be set, but instead an event handler for the introPress event should be registered.

Since: 1.28.

Visibility: public
introTarget string

Determines the target attribute for the intro link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

Since: 1.28.

Visibility: public
introTextDirection sap.ui.core.TextDirection Inherit

Specifies the intro text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Since: 1.28.0.

Visibility: public
markFavorite boolean false

Sets the favorite state for the ObjectHeader. The showMarkers property must be set to true for this property to take effect.

Since: 1.16.0.

Visibility: public
markFlagged boolean false

Sets the flagged state for the ObjectHeader. The showMarkers property must be set to true for this property to take effect.

Since: 1.16.0.

Visibility: public
number string

Determines the displayed number of the ObjectHeader number field.

Visibility: public
numberState sap.ui.core.ValueState None

Determines the value state of the number and numberUnit properties.

Since: 1.16.0.

Visibility: public
numberTextDirection sap.ui.core.TextDirection Inherit

Specifies the number and unit text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Since: 1.28.0.

Visibility: public
numberUnit string

Determines the units qualifier of the ObjectHeader number.

Note: The value of the numberUnit is not displayed if the number property is set to null.

Visibility: public
responsive boolean false

Determines whether the ObjectHeader is rendered with a different design that reacts responsively to the screen sizes.

When the responsive property is set to true, the following behavior specifics for the control exist:

  • If an image (or an icon font) is set to the icon property, it is hidden in portrait mode on phone.
  • The title is truncated to 80 characters if longer. For portrait mode on phone, the title is truncated to 50 characters.


Since: 1.21.1.

Visibility: public
showMarkers boolean false

If set to true, the ObjectHeader can be marked with icons such as favorite and flag.

Since: 1.16.0.

Visibility: public
showTitleSelector boolean false

Determines whether the selector arrow icon/image is displayed and can be pressed.

Since: 1.16.0.

Visibility: public
title string

Determines the title of the ObjectHeader.

Visibility: public
titleActive boolean

Determines whether the title of the ObjectHeader is clickable and is set only if a title is provided.

Visibility: public
titleHref sap.ui.core.URI

Defines the title link target URI. Supports standard hyperlink behavior.

Note: If an action should be triggered, this property should not be set, but instead an event handler for the titlePress event should be registered.

Since: 1.28.

Visibility: public
titleLevel sap.ui.core.TitleLevel H1

Defines the semantic level of the title.

This information is used by assistive technologies, such as screen readers to create a hierarchical site map for faster navigation. Depending on this setting an HTML h1-h6 element is used.

Visibility: public
titleSelectorTooltip string Options

Determines a custom text for the tooltip of the select title arrow. If not set, a default text of the tooltip will be displayed.

Since: 1.30.0.

Visibility: public
titleTarget string

Determines the target attribute for the title link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

Since: 1.28.

Visibility: public
titleTextDirection sap.ui.core.TextDirection Inherit

Specifies the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Since: 1.28.0.

Visibility: public

Aggregations

Default Aggregation: attributes

Name Cardinality Type Description
_objectNumber 0..1 sap.m.ObjectNumber

The object number and unit are managed in this aggregation

additionalNumbers 0..n sap.m.ObjectNumber

NOTE: Only applied if you set "responsive=false". Additional object numbers and units are managed in this aggregation. The numbers are hidden on tablet and phone size screens. When only one number is provided, it is rendered with additional separator from the main ObjectHeader number.

Since: 1.38.0.

attributes (default) 0..n sap.m.ObjectAttribute

The list of Object Attributes

firstStatus 0..1 sap.m.ObjectStatus

First status shown on the right side of the attributes above the second status. If it is not set the first attribute will expand to take the entire row.
Deprecated as of version 1.16.0. replaced by statuses aggregation

headerContainer 0..1 sap.m.ObjectHeaderContainer

This aggregation takes only effect when you set "responsive" to true. It can either be filled with an sap.m.IconTabBar or an sap.suite.ui.commons.HeaderContainer control. Overflow handling must be taken care of by the inner control. If used with an IconTabBar control, only the header will be displayed inside the object header, the content will be displayed below the ObjectHeader.

Since: 1.21.1.

markers 0..n sap.m.ObjectMarker

List of markers (icon and/or text) that can be displayed for the ObjectHeader, such as favorite and flagged.

Note: You should use either this aggregation or the already deprecated properties - markFlagged and markFavorite. Using both can lead to unexpected results.

secondStatus 0..1 sap.m.ObjectStatus

Second status shown on the right side of the attributes below the first status. If it is not set the second attribute will expand to take the entire row.
Deprecated as of version 1.16.0. replaced by statuses aggregation

statuses 0..n sap.ui.core.Control

The list of Object sap.ui.core.Control. It will only allow sap.m.ObjectStatus and sap.m.ProgressIndicator controls.

Since: 1.16.0.


Associations

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

Association to controls / ids which describe this control (see WAI-ARIA attribute aria-describedby).

ariaLabelledBy 0..n sap.ui.core.Control

Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby).


Events Overview

Event Description
iconPress

Event is fired when the title icon is active and the user taps/clicks on it

introPress

Event is fired when the intro is active and the user taps/clicks on it

titlePress

Event is fired when the title is active and the user taps/clicks on it

titleSelectorPress

Event is fired when the object header title selector (down-arrow) is pressed

Since: 1.16.0.

iconPress

Event is fired when the title icon is active and the user taps/clicks on it

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
domRef object

Dom reference of the object header' icon to be used for positioning.

introPress

Event is fired when the intro is active and the user taps/clicks on it

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
domRef object

Dom reference of the object header' intro to be used for positioning.

titlePress

Event is fired when the title is active and the user taps/clicks on it

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
domRef object

Dom reference of the object header' title to be used for positioning.

titleSelectorPress

Event is fired when the object header title selector (down-arrow) is pressed

Since: 1.16.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
domRef object

Dom reference of the object header' titleArrow to be used for positioning.


Methods Overview

Method Description
addAdditionalNumber

Adds some additionalNumber to the aggregation additionalNumbers.

addAriaDescribedBy

Adds some ariaDescribedBy into the association ariaDescribedBy.

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

addAttribute

Adds some attribute to the aggregation attributes.

addMarker

Adds some marker to the aggregation markers.

addStatus

Adds some status to the aggregation statuses.

attachIconPress

Attaches event handler fnFunction to the iconPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the title icon is active and the user taps/clicks on it

attachIntroPress

Attaches event handler fnFunction to the introPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the intro is active and the user taps/clicks on it

attachTitlePress

Attaches event handler fnFunction to the titlePress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the title is active and the user taps/clicks on it

attachTitleSelectorPress

Attaches event handler fnFunction to the titleSelectorPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the object header title selector (down-arrow) is pressed

destroyAdditionalNumbers

Destroys all the additionalNumbers in the aggregation additionalNumbers.

destroyAttributes

Destroys all the attributes in the aggregation attributes.

destroyFirstStatus

Destroys the firstStatus in the aggregation firstStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation
destroyHeaderContainer

Destroys the headerContainer in the aggregation headerContainer.

destroyMarkers

Destroys all the markers in the aggregation markers.

destroySecondStatus

Destroys the secondStatus in the aggregation secondStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation
destroyStatuses

Destroys all the statuses in the aggregation statuses.

detachIconPress

Detaches event handler fnFunction from the iconPress event of this sap.m.ObjectHeader.

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

detachIntroPress

Detaches event handler fnFunction from the introPress event of this sap.m.ObjectHeader.

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

detachTitlePress

Detaches event handler fnFunction from the titlePress event of this sap.m.ObjectHeader.

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

detachTitleSelectorPress

Detaches event handler fnFunction from the titleSelectorPress event of this sap.m.ObjectHeader.

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

sap.m.ObjectHeader.extend

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

fireIconPress

Fires event iconPress to attached listeners.

fireIntroPress

Fires event introPress to attached listeners.

fireTitlePress

Fires event titlePress to attached listeners.

fireTitleSelectorPress

Fires event titleSelectorPress to attached listeners.

getAdditionalNumbers

Gets content of aggregation additionalNumbers.

NOTE: Only applied if you set "responsive=false". Additional object numbers and units are managed in this aggregation. The numbers are hidden on tablet and phone size screens. When only one number is provided, it is rendered with additional separator from the main ObjectHeader number.

getAriaDescribedBy

Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getAttributes

Gets content of aggregation attributes.

The list of Object Attributes

getBackgroundDesign

Gets current value of property backgroundDesign.

Determines the background color of the ObjectHeader.

Note: The different types of ObjectHeader come with different default background:

  • non responsive - Transparent
  • responsive - Translucent
  • condensed - Solid

getCondensed

Gets current value of property condensed.

ObjectHeader with title, one attribute, number, and number unit.

Note: Only applied if the responsive property is set to false.

Default value is false.

getFirstStatus

Gets content of aggregation firstStatus.

First status shown on the right side of the attributes above the second status. If it is not set the first attribute will expand to take the entire row.

Since 1.16.0 replaced by <code>statuses</code> aggregation
getFullScreenOptimized

Gets current value of property fullScreenOptimized.

Optimizes the display of the elements of the ObjectHeader.

Set this property to true if your app uses a fullscreen layout (as opposed to a master-detail or other split-screen layout).

Note: Only applied if the responsive property is also set to true.

If set to true, the following situations apply:

  • On desktop, 1-3 attributes/statuses - positioned as a third block on the right side of the Title/Number group
  • On desktop, 4+ attributes/statuses - 4 columns below the Title/Number
  • On tablet (portrait mode), always in 2 columns below the Title/Number
  • On tablet (landscape mode), 1-2 attributes/statuses - 2 columns below the Title/Number
  • On tablet (landscape mode), 3+ attributes/statuses - 3 columns below the Title/Number
On phone, the attributes and statuses are always positioned in 1 column below the Title/Number of the ObjectHeader.

If set to false, the attributes and statuses are being positioned below the Title/Number of the ObjectHeader in 2 or 3 columns depending on their number:

  • On desktop, 1-4 attributes/statuses - 2 columns
  • On desktop, 5+ attributes/statuses - 3 columns
  • On tablet, always in 2 columns

Default value is false.

getHeaderContainer

Gets content of aggregation headerContainer.

This aggregation takes only effect when you set "responsive" to true. It can either be filled with an sap.m.IconTabBar or an sap.suite.ui.commons.HeaderContainer control. Overflow handling must be taken care of by the inner control. If used with an IconTabBar control, only the header will be displayed inside the object header, the content will be displayed below the ObjectHeader.

getIcon

Gets current value of property icon.

Defines the icon of the ObjectHeader.

Note: Recursive resolution of binding expressions is not supported by the framework. It works only in ObjectHeader, since it is a composite control and creates an Image control internally.

getIconActive

Gets current value of property iconActive.

Determines whether the ObjectHeader icon is clickable.

getIconAlt

Gets current value of property iconAlt.

Determines the alternative text of the ObjectHeader icon. The text is displayed if the image for the icon is not available, or cannot be displayed.

Note: Provide an empty string value for the iconAlt property in case you want to use the icon for decoration only.

getIconDensityAware

Gets current value of property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is the key for the application, set this value to false.

Default value is true.

getIconTooltip

Gets current value of property iconTooltip.

Determines the tooltip text of the ObjectHeader icon.

getImageShape

Gets current value of property imageShape.

Determines whether the picture should be displayed in a square or with a circle-shaped mask just like in sap.uxap.ObjectPageHeader.

Note: This property takes effect only on Images and it is ignored for Icons.

Default value is Square.

getIntro

Gets current value of property intro.

Determines the introductory text for the ObjectHeader.

getIntroActive

Gets current value of property introActive.

Determines whether the introductory text of the ObjectHeader is clickable.

getIntroHref

Gets current value of property introHref.

Determines the intro link target URI. Supports standard hyperlink behavior. If an action should be triggered, this should not be set, but instead an event handler for the introPress event should be registered.

getIntroTarget

Gets current value of property introTarget.

Determines the target attribute for the intro link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

getIntroTextDirection

Gets current value of property introTextDirection.

Specifies the intro text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getMarkers

Gets content of aggregation markers.

List of markers (icon and/or text) that can be displayed for the ObjectHeader, such as favorite and flagged.

Note: You should use either this aggregation or the already deprecated properties - markFlagged and markFavorite. Using both can lead to unexpected results.

getMarkFavorite

Gets current value of property markFavorite.

Sets the favorite state for the ObjectHeader. The showMarkers property must be set to true for this property to take effect.

Default value is false.

Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Favorite</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.
getMarkFlagged

Gets current value of property markFlagged.

Sets the flagged state for the ObjectHeader. The showMarkers property must be set to true for this property to take effect.

Default value is false.

Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Flagged</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.
sap.m.ObjectHeader.getMetadata

Returns a metadata object for class sap.m.ObjectHeader.

getNumber

Gets current value of property number.

Determines the displayed number of the ObjectHeader number field.

getNumberState

Gets current value of property numberState.

Determines the value state of the number and numberUnit properties.

Default value is None.

getNumberTextDirection

Gets current value of property numberTextDirection.

Specifies the number and unit text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getNumberUnit

Gets current value of property numberUnit.

Determines the units qualifier of the ObjectHeader number.

Note: The value of the numberUnit is not displayed if the number property is set to null.

getResponsive

Gets current value of property responsive.

Determines whether the ObjectHeader is rendered with a different design that reacts responsively to the screen sizes.

When the responsive property is set to true, the following behavior specifics for the control exist:

  • If an image (or an icon font) is set to the icon property, it is hidden in portrait mode on phone.
  • The title is truncated to 80 characters if longer. For portrait mode on phone, the title is truncated to 50 characters.

Default value is false.

getSecondStatus

Gets content of aggregation secondStatus.

Second status shown on the right side of the attributes below the first status. If it is not set the second attribute will expand to take the entire row.

Since 1.16.0 replaced by <code>statuses</code> aggregation
getShowMarkers

Gets current value of property showMarkers.

If set to true, the ObjectHeader can be marked with icons such as favorite and flag.

Default value is false.

Since 1.42.0 replaced by <code>markers</code> aggregationv. This property is valid only if you are using the already deprecated properties - <code>markFlagged</code> and <code>markFavorite</code>. If you are using <code>markers</code>, the visibility of the markers depends on what is set in the aggregation itself.
getShowTitleSelector

Gets current value of property showTitleSelector.

Determines whether the selector arrow icon/image is displayed and can be pressed.

Default value is false.

getStatuses

Gets content of aggregation statuses.

The list of Object sap.ui.core.Control. It will only allow sap.m.ObjectStatus and sap.m.ProgressIndicator controls.

getTitle

Gets current value of property title.

Determines the title of the ObjectHeader.

getTitleActive

Gets current value of property titleActive.

Determines whether the title of the ObjectHeader is clickable and is set only if a title is provided.

getTitleHref

Gets current value of property titleHref.

Defines the title link target URI. Supports standard hyperlink behavior.

Note: If an action should be triggered, this property should not be set, but instead an event handler for the titlePress event should be registered.

getTitleLevel

Gets current value of property titleLevel.

Defines the semantic level of the title.

This information is used by assistive technologies, such as screen readers to create a hierarchical site map for faster navigation. Depending on this setting an HTML h1-h6 element is used.

Default value is H1.

getTitleSelectorTooltip

Gets current value of property titleSelectorTooltip.

Determines a custom text for the tooltip of the select title arrow. If not set, a default text of the tooltip will be displayed.

Default value is "Options".

getTitleTarget

Gets current value of property titleTarget.

Determines the target attribute for the title link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

getTitleTextDirection

Gets current value of property titleTextDirection.

Specifies the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

indexOfAdditionalNumber

Checks for the provided sap.m.ObjectNumber in the aggregation additionalNumbers. and returns its index if found or -1 otherwise.

indexOfAttribute

Checks for the provided sap.m.ObjectAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.

indexOfMarker

Checks for the provided sap.m.ObjectMarker in the aggregation markers. and returns its index if found or -1 otherwise.

indexOfStatus

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

insertAdditionalNumber

Inserts a additionalNumber into the aggregation additionalNumbers.

insertAttribute

Inserts a attribute into the aggregation attributes.

insertMarker

Inserts a marker into the aggregation markers.

insertStatus

Inserts a status into the aggregation statuses.

removeAdditionalNumber

Removes a additionalNumber from the aggregation additionalNumbers.

removeAllAdditionalNumbers

Removes all the controls from the aggregation additionalNumbers.

Additionally, it unregisters them from the hosting UIArea.

removeAllAriaDescribedBy

Removes all the controls in the association named ariaDescribedBy.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllAttributes

Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

removeAllMarkers

Removes all the controls from the aggregation markers.

Additionally, it unregisters them from the hosting UIArea.

removeAllStatuses

Removes all the controls from the aggregation statuses.

Additionally, it unregisters them from the hosting UIArea.

removeAriaDescribedBy

Removes an ariaDescribedBy from the association named ariaDescribedBy.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

removeAttribute

Removes a attribute from the aggregation attributes.

removeMarker

Removes a marker from the aggregation markers.

removeStatus

Removes a status from the aggregation statuses.

setBackgroundDesign

Sets a new value for property backgroundDesign.

Determines the background color of the ObjectHeader.

Note: The different types of ObjectHeader come with different default background:

  • non responsive - Transparent
  • responsive - Translucent
  • condensed - Solid

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

setCondensed

Set the condensed flag

setFirstStatus

Sets the aggregated firstStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation
setFullScreenOptimized

Sets a new value for property fullScreenOptimized.

Optimizes the display of the elements of the ObjectHeader.

Set this property to true if your app uses a fullscreen layout (as opposed to a master-detail or other split-screen layout).

Note: Only applied if the responsive property is also set to true.

If set to true, the following situations apply:

  • On desktop, 1-3 attributes/statuses - positioned as a third block on the right side of the Title/Number group
  • On desktop, 4+ attributes/statuses - 4 columns below the Title/Number
  • On tablet (portrait mode), always in 2 columns below the Title/Number
  • On tablet (landscape mode), 1-2 attributes/statuses - 2 columns below the Title/Number
  • On tablet (landscape mode), 3+ attributes/statuses - 3 columns below the Title/Number
On phone, the attributes and statuses are always positioned in 1 column below the Title/Number of the ObjectHeader.

If set to false, the attributes and statuses are being positioned below the Title/Number of the ObjectHeader in 2 or 3 columns depending on their number:

  • On desktop, 1-4 attributes/statuses - 2 columns
  • On desktop, 5+ attributes/statuses - 3 columns
  • On tablet, always in 2 columns

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

Default value is false.

setHeaderContainer

Sets the aggregated headerContainer.

setIcon

Sets a new value for property icon.

Defines the icon of the ObjectHeader.

Note: Recursive resolution of binding expressions is not supported by the framework. It works only in ObjectHeader, since it is a composite control and creates an Image control internally.

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

setIconActive

Sets a new value for property iconActive.

Determines whether the ObjectHeader icon is clickable.

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

setIconAlt

Sets the alternative text of the ObjectHeader icon.

setIconDensityAware

Sets a new value for property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is the key for the application, set this value to false.

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

Default value is true.

setIconTooltip

Sets a new value for property iconTooltip.

Determines the tooltip text of the ObjectHeader icon.

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

setImageShape

Sets a new value for property imageShape.

Determines whether the picture should be displayed in a square or with a circle-shaped mask just like in sap.uxap.ObjectPageHeader.

Note: This property takes effect only on Images and it is ignored for Icons.

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

Default value is Square.

setIntro

Sets a new value for property intro.

Determines the introductory text for the ObjectHeader.

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

setIntroActive

Sets a new value for property introActive.

Determines whether the introductory text of the ObjectHeader is clickable.

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

setIntroHref

Sets a new value for property introHref.

Determines the intro link target URI. Supports standard hyperlink behavior. If an action should be triggered, this should not be set, but instead an event handler for the introPress event should be registered.

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

setIntroTarget

Sets a new value for property introTarget.

Determines the target attribute for the intro link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

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

setIntroTextDirection

Sets a new value for property introTextDirection.

Specifies the intro text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

setMarkFavorite

Sets the visibility value of the Favorite marker.

setMarkFlagged

Sets the visibility value of the Flagged marker.

setNumber

Set the number value to the internal aggregation

setNumberState

Set the number state to the internal aggregation

setNumberTextDirection

Sets a new value for property numberTextDirection.

Specifies the number and unit text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

setNumberUnit

Set the number unit to the internal aggregation

setResponsive

Sets a new value for property responsive.

Determines whether the ObjectHeader is rendered with a different design that reacts responsively to the screen sizes.

When the responsive property is set to true, the following behavior specifics for the control exist:

  • If an image (or an icon font) is set to the icon property, it is hidden in portrait mode on phone.
  • The title is truncated to 80 characters if longer. For portrait mode on phone, the title is truncated to 50 characters.

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

Default value is false.

setSecondStatus

Sets the aggregated secondStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation
setShowMarkers

Sets the visibility value of the Flagged and Favorite markers.

setShowTitleSelector

Sets a new value for property showTitleSelector.

Determines whether the selector arrow icon/image is displayed and can be pressed.

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.

Determines the title of the ObjectHeader.

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

setTitleActive

Sets a new value for property titleActive.

Determines whether the title of the ObjectHeader is clickable and is set only if a title is provided.

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

setTitleHref

Sets a new value for property titleHref.

Defines the title link target URI. Supports standard hyperlink behavior.

Note: If an action should be triggered, this property should not be set, but instead an event handler for the titlePress event should be registered.

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

setTitleLevel

Sets a new value for property titleLevel.

Defines the semantic level of the title.

This information is used by assistive technologies, such as screen readers to create a hierarchical site map for faster navigation. Depending on this setting an HTML h1-h6 element is used.

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

Default value is H1.

setTitleSelectorTooltip

Sets the new text for the tooltip of the select title arrow to the internal aggregation

setTitleTarget

Sets a new value for property titleTarget.

Determines the target attribute for the title link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

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

setTitleTextDirection

Sets a new value for property titleTextDirection.

Specifies the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

addAdditionalNumber

Adds some additionalNumber to the aggregation additionalNumbers.

Param Type DefaultValue Description
oAdditionalNumber sap.m.ObjectNumber

The additionalNumber to add; if empty, nothing is inserted

addAriaDescribedBy

Adds some ariaDescribedBy into the association ariaDescribedBy.

Param Type DefaultValue Description
vAriaDescribedBy sap.ui.core.ID sap.ui.core.Control

The ariaDescribedBy to add; if empty, nothing is inserted

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to add; if empty, nothing is inserted

addAttribute

Adds some attribute to the aggregation attributes.

Param Type DefaultValue Description
oAttribute sap.m.ObjectAttribute

The attribute to add; if empty, nothing is inserted

addMarker

Adds some marker to the aggregation markers.

Param Type DefaultValue Description
oMarker sap.m.ObjectMarker

The marker to add; if empty, nothing is inserted

addStatus

Adds some status to the aggregation statuses.

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

The status to add; if empty, nothing is inserted

attachIconPress

Attaches event handler fnFunction to the iconPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the title icon is active and the user taps/clicks on it

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.m.ObjectHeader itself

attachIntroPress

Attaches event handler fnFunction to the introPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the intro is active and the user taps/clicks on it

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.m.ObjectHeader itself

attachTitlePress

Attaches event handler fnFunction to the titlePress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the title is active and the user taps/clicks on it

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.m.ObjectHeader itself

attachTitleSelectorPress

Attaches event handler fnFunction to the titleSelectorPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader itself.

Event is fired when the object header title selector (down-arrow) 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.m.ObjectHeader itself

destroyAdditionalNumbers

Destroys all the additionalNumbers in the aggregation additionalNumbers.

destroyAttributes

Destroys all the attributes in the aggregation attributes.

destroyFirstStatus

Destroys the firstStatus in the aggregation firstStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation

destroyHeaderContainer

Destroys the headerContainer in the aggregation headerContainer.

destroyMarkers

Destroys all the markers in the aggregation markers.

destroySecondStatus

Destroys the secondStatus in the aggregation secondStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation

destroyStatuses

Destroys all the statuses in the aggregation statuses.

detachIconPress

Detaches event handler fnFunction from the iconPress event of this sap.m.ObjectHeader.

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

detachIntroPress

Detaches event handler fnFunction from the introPress event of this sap.m.ObjectHeader.

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

detachTitlePress

Detaches event handler fnFunction from the titlePress event of this sap.m.ObjectHeader.

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

detachTitleSelectorPress

Detaches event handler fnFunction from the titleSelectorPress event of this sap.m.ObjectHeader.

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.m.ObjectHeader.extend

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

fireIconPress

Fires event iconPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

domRef object

Dom reference of the object header' icon to be used for positioning.

fireIntroPress

Fires event introPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

domRef object

Dom reference of the object header' intro to be used for positioning.

fireTitlePress

Fires event titlePress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

domRef object

Dom reference of the object header' title to be used for positioning.

fireTitleSelectorPress

Fires event titleSelectorPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

domRef object

Dom reference of the object header' titleArrow to be used for positioning.

getAdditionalNumbers

Gets content of aggregation additionalNumbers.

NOTE: Only applied if you set "responsive=false". Additional object numbers and units are managed in this aggregation. The numbers are hidden on tablet and phone size screens. When only one number is provided, it is rendered with additional separator from the main ObjectHeader number.

getAriaDescribedBy

Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getAttributes

Gets content of aggregation attributes.

The list of Object Attributes

getBackgroundDesign

Gets current value of property backgroundDesign.

Determines the background color of the ObjectHeader.

Note: The different types of ObjectHeader come with different default background:

getCondensed

Gets current value of property condensed.

ObjectHeader with title, one attribute, number, and number unit.

Note: Only applied if the responsive property is set to false.

Default value is false.

getFirstStatus

Gets content of aggregation firstStatus.

First status shown on the right side of the attributes above the second status. If it is not set the first attribute will expand to take the entire row.

Since 1.16.0 replaced by <code>statuses</code> aggregation

getFullScreenOptimized

Gets current value of property fullScreenOptimized.

Optimizes the display of the elements of the ObjectHeader.

Set this property to true if your app uses a fullscreen layout (as opposed to a master-detail or other split-screen layout).

Note: Only applied if the responsive property is also set to true.

If set to true, the following situations apply:

On phone, the attributes and statuses are always positioned in 1 column below the Title/Number of the ObjectHeader.

If set to false, the attributes and statuses are being positioned below the Title/Number of the ObjectHeader in 2 or 3 columns depending on their number:

Default value is false.

getHeaderContainer

Gets content of aggregation headerContainer.

This aggregation takes only effect when you set "responsive" to true. It can either be filled with an sap.m.IconTabBar or an sap.suite.ui.commons.HeaderContainer control. Overflow handling must be taken care of by the inner control. If used with an IconTabBar control, only the header will be displayed inside the object header, the content will be displayed below the ObjectHeader.

getIcon

Gets current value of property icon.

Defines the icon of the ObjectHeader.

Note: Recursive resolution of binding expressions is not supported by the framework. It works only in ObjectHeader, since it is a composite control and creates an Image control internally.

getIconActive

Gets current value of property iconActive.

Determines whether the ObjectHeader icon is clickable.

getIconAlt

Gets current value of property iconAlt.

Determines the alternative text of the ObjectHeader icon. The text is displayed if the image for the icon is not available, or cannot be displayed.

Note: Provide an empty string value for the iconAlt property in case you want to use the icon for decoration only.

getIconDensityAware

Gets current value of property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is the key for the application, set this value to false.

Default value is true.

getIconTooltip

Gets current value of property iconTooltip.

Determines the tooltip text of the ObjectHeader icon.

getImageShape

Gets current value of property imageShape.

Determines whether the picture should be displayed in a square or with a circle-shaped mask just like in sap.uxap.ObjectPageHeader.

Note: This property takes effect only on Images and it is ignored for Icons.

Default value is Square.

getIntro

Gets current value of property intro.

Determines the introductory text for the ObjectHeader.

getIntroActive

Gets current value of property introActive.

Determines whether the introductory text of the ObjectHeader is clickable.

getIntroHref

Gets current value of property introHref.

Determines the intro link target URI. Supports standard hyperlink behavior. If an action should be triggered, this should not be set, but instead an event handler for the introPress event should be registered.

getIntroTarget

Gets current value of property introTarget.

Determines the target attribute for the intro link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

getIntroTextDirection

Gets current value of property introTextDirection.

Specifies the intro text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getMarkers

Gets content of aggregation markers.

List of markers (icon and/or text) that can be displayed for the ObjectHeader, such as favorite and flagged.

Note: You should use either this aggregation or the already deprecated properties - markFlagged and markFavorite. Using both can lead to unexpected results.

getMarkFavorite

Gets current value of property markFavorite.

Sets the favorite state for the ObjectHeader. The showMarkers property must be set to true for this property to take effect.

Default value is false.

Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Favorite</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.

getMarkFlagged

Gets current value of property markFlagged.

Sets the flagged state for the ObjectHeader. The showMarkers property must be set to true for this property to take effect.

Default value is false.

Since 1.42.0 replaced by <code>markers</code> aggregation. Add {@link sap.m.ObjectMarker} with type <code>sap.m.ObjectMarkerType.Flagged</code>. You should use either this property or the <code>markers</code> aggregation, using both may lead to unpredicted behavior.

sap.m.ObjectHeader.getMetadata

Returns a metadata object for class sap.m.ObjectHeader.

getNumber

Gets current value of property number.

Determines the displayed number of the ObjectHeader number field.

getNumberState

Gets current value of property numberState.

Determines the value state of the number and numberUnit properties.

Default value is None.

getNumberTextDirection

Gets current value of property numberTextDirection.

Specifies the number and unit text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

getNumberUnit

Gets current value of property numberUnit.

Determines the units qualifier of the ObjectHeader number.

Note: The value of the numberUnit is not displayed if the number property is set to null.

getResponsive

Gets current value of property responsive.

Determines whether the ObjectHeader is rendered with a different design that reacts responsively to the screen sizes.

When the responsive property is set to true, the following behavior specifics for the control exist:

Default value is false.

getSecondStatus

Gets content of aggregation secondStatus.

Second status shown on the right side of the attributes below the first status. If it is not set the second attribute will expand to take the entire row.

Since 1.16.0 replaced by <code>statuses</code> aggregation

getShowMarkers

Gets current value of property showMarkers.

If set to true, the ObjectHeader can be marked with icons such as favorite and flag.

Default value is false.

Since 1.42.0 replaced by <code>markers</code> aggregationv. This property is valid only if you are using the already deprecated properties - <code>markFlagged</code> and <code>markFavorite</code>. If you are using <code>markers</code>, the visibility of the markers depends on what is set in the aggregation itself.

getShowTitleSelector

Gets current value of property showTitleSelector.

Determines whether the selector arrow icon/image is displayed and can be pressed.

Default value is false.

getStatuses

Gets content of aggregation statuses.

The list of Object sap.ui.core.Control. It will only allow sap.m.ObjectStatus and sap.m.ProgressIndicator controls.

getTitle

Gets current value of property title.

Determines the title of the ObjectHeader.

getTitleActive

Gets current value of property titleActive.

Determines whether the title of the ObjectHeader is clickable and is set only if a title is provided.

getTitleHref

Gets current value of property titleHref.

Defines the title link target URI. Supports standard hyperlink behavior.

Note: If an action should be triggered, this property should not be set, but instead an event handler for the titlePress event should be registered.

getTitleLevel

Gets current value of property titleLevel.

Defines the semantic level of the title.

This information is used by assistive technologies, such as screen readers to create a hierarchical site map for faster navigation. Depending on this setting an HTML h1-h6 element is used.

Default value is H1.

getTitleSelectorTooltip

Gets current value of property titleSelectorTooltip.

Determines a custom text for the tooltip of the select title arrow. If not set, a default text of the tooltip will be displayed.

Default value is "Options".

getTitleTarget

Gets current value of property titleTarget.

Determines the target attribute for the title link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

getTitleTextDirection

Gets current value of property titleTextDirection.

Specifies the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

Default value is Inherit.

indexOfAdditionalNumber

Checks for the provided sap.m.ObjectNumber in the aggregation additionalNumbers. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAdditionalNumber sap.m.ObjectNumber

The additionalNumber whose index is looked for

indexOfAttribute

Checks for the provided sap.m.ObjectAttribute in the aggregation attributes. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAttribute sap.m.ObjectAttribute

The attribute whose index is looked for

indexOfMarker

Checks for the provided sap.m.ObjectMarker in the aggregation markers. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oMarker sap.m.ObjectMarker

The marker whose index is looked for

indexOfStatus

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

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

The status whose index is looked for

insertAdditionalNumber

Inserts a additionalNumber into the aggregation additionalNumbers.

Param Type DefaultValue Description
oAdditionalNumber sap.m.ObjectNumber

The additionalNumber to insert; if empty, nothing is inserted

iIndex int

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

insertAttribute

Inserts a attribute into the aggregation attributes.

Param Type DefaultValue Description
oAttribute sap.m.ObjectAttribute

The attribute to insert; if empty, nothing is inserted

iIndex int

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

insertMarker

Inserts a marker into the aggregation markers.

Param Type DefaultValue Description
oMarker sap.m.ObjectMarker

The marker to insert; if empty, nothing is inserted

iIndex int

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

insertStatus

Inserts a status into the aggregation statuses.

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

The status to insert; if empty, nothing is inserted

iIndex int

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

removeAdditionalNumber

Removes a additionalNumber from the aggregation additionalNumbers.

Param Type DefaultValue Description
vAdditionalNumber int string sap.m.ObjectNumber

The additionalNumber to remove or its index or id

removeAllAdditionalNumbers

Removes all the controls from the aggregation additionalNumbers.

Additionally, it unregisters them from the hosting UIArea.

removeAllAriaDescribedBy

Removes all the controls in the association named ariaDescribedBy.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllAttributes

Removes all the controls from the aggregation attributes.

Additionally, it unregisters them from the hosting UIArea.

removeAllMarkers

Removes all the controls from the aggregation markers.

Additionally, it unregisters them from the hosting UIArea.

removeAllStatuses

Removes all the controls from the aggregation statuses.

Additionally, it unregisters them from the hosting UIArea.

removeAriaDescribedBy

Removes an ariaDescribedBy from the association named ariaDescribedBy.

Param Type DefaultValue Description
vAriaDescribedBy int sap.ui.core.ID sap.ui.core.Control

The ariaDescribedBy to be removed or its index or ID

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy int sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to be removed or its index or ID

removeAttribute

Removes a attribute from the aggregation attributes.

Param Type DefaultValue Description
vAttribute int string sap.m.ObjectAttribute

The attribute to remove or its index or id

removeMarker

Removes a marker from the aggregation markers.

Param Type DefaultValue Description
vMarker int string sap.m.ObjectMarker

The marker to remove or its index or id

removeStatus

Removes a status from the aggregation statuses.

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

The status to remove or its index or id

setBackgroundDesign

Sets a new value for property backgroundDesign.

Determines the background color of the ObjectHeader.

Note: The different types of ObjectHeader come with different default background:

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

Param Type DefaultValue Description
sBackgroundDesign sap.m.BackgroundDesign

New value for property backgroundDesign

setCondensed

Set the condensed flag

Param Type DefaultValue Description
bCondensed boolean

the new value

setFirstStatus

Sets the aggregated firstStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation
Param Type DefaultValue Description
oFirstStatus sap.m.ObjectStatus

The firstStatus to set

setFullScreenOptimized

Sets a new value for property fullScreenOptimized.

Optimizes the display of the elements of the ObjectHeader.

Set this property to true if your app uses a fullscreen layout (as opposed to a master-detail or other split-screen layout).

Note: Only applied if the responsive property is also set to true.

If set to true, the following situations apply:

On phone, the attributes and statuses are always positioned in 1 column below the Title/Number of the ObjectHeader.

If set to false, the attributes and statuses are being positioned below the Title/Number of the ObjectHeader in 2 or 3 columns depending on their number:

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
bFullScreenOptimized boolean false

New value for property fullScreenOptimized

setHeaderContainer

Sets the aggregated headerContainer.

Param Type DefaultValue Description
oHeaderContainer sap.m.ObjectHeaderContainer

The headerContainer to set

setIcon

Sets a new value for property icon.

Defines the icon of the ObjectHeader.

Note: Recursive resolution of binding expressions is not supported by the framework. It works only in ObjectHeader, since it is a composite control and creates an Image control internally.

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

setIconActive

Sets a new value for property iconActive.

Determines whether the ObjectHeader icon is clickable.

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

Param Type DefaultValue Description
bIconActive boolean

New value for property iconActive

setIconAlt

Sets the alternative text of the ObjectHeader icon.

Param Type DefaultValue Description
sIconAlt boolean

the alternative icon text

setIconDensityAware

Sets a new value for property iconDensityAware.

By default, this is set to true but then one or more requests are sent trying to get the density perfect version of image if this version of image doesn't exist on the server.

If bandwidth is the key for the application, set this value to false.

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
bIconDensityAware boolean true

New value for property iconDensityAware

setIconTooltip

Sets a new value for property iconTooltip.

Determines the tooltip text of the ObjectHeader icon.

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

Param Type DefaultValue Description
sIconTooltip string

New value for property iconTooltip

setImageShape

Sets a new value for property imageShape.

Determines whether the picture should be displayed in a square or with a circle-shaped mask just like in sap.uxap.ObjectPageHeader.

Note: This property takes effect only on Images and it is ignored for Icons.

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

Default value is Square.

Param Type DefaultValue Description
sImageShape sap.m.ObjectHeaderPictureShape Square

New value for property imageShape

setIntro

Sets a new value for property intro.

Determines the introductory text for the ObjectHeader.

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

Param Type DefaultValue Description
sIntro string

New value for property intro

setIntroActive

Sets a new value for property introActive.

Determines whether the introductory text of the ObjectHeader is clickable.

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

Param Type DefaultValue Description
bIntroActive boolean

New value for property introActive

setIntroHref

Sets a new value for property introHref.

Determines the intro link target URI. Supports standard hyperlink behavior. If an action should be triggered, this should not be set, but instead an event handler for the introPress event should be registered.

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

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

New value for property introHref

setIntroTarget

Sets a new value for property introTarget.

Determines the target attribute for the intro link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

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

Param Type DefaultValue Description
sIntroTarget string

New value for property introTarget

setIntroTextDirection

Sets a new value for property introTextDirection.

Specifies the intro text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

Param Type DefaultValue Description
sIntroTextDirection sap.ui.core.TextDirection Inherit

New value for property introTextDirection

setMarkFavorite

Sets the visibility value of the Favorite marker.

Param Type DefaultValue Description
bMarked boolean

visibility of the marker

setMarkFlagged

Sets the visibility value of the Flagged marker.

Param Type DefaultValue Description
bMarked boolean

visibility of the marker

setNumber

Set the number value to the internal aggregation

Param Type DefaultValue Description
sNumber string

the new value

setNumberState

Set the number state to the internal aggregation

Param Type DefaultValue Description
sState sap.ui.core.ValueState

the new value

setNumberTextDirection

Sets a new value for property numberTextDirection.

Specifies the number and unit text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

Param Type DefaultValue Description
sNumberTextDirection sap.ui.core.TextDirection Inherit

New value for property numberTextDirection

setNumberUnit

Set the number unit to the internal aggregation

Param Type DefaultValue Description
sUnit string

the new value

setResponsive

Sets a new value for property responsive.

Determines whether the ObjectHeader is rendered with a different design that reacts responsively to the screen sizes.

When the responsive property is set to true, the following behavior specifics for the control exist:

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
bResponsive boolean false

New value for property responsive

setSecondStatus

Sets the aggregated secondStatus.

Since 1.16.0 replaced by <code>statuses</code> aggregation
Param Type DefaultValue Description
oSecondStatus sap.m.ObjectStatus

The secondStatus to set

setShowMarkers

Sets the visibility value of the Flagged and Favorite markers.

Param Type DefaultValue Description
bMarked boolean

visibility of all markers

setShowTitleSelector

Sets a new value for property showTitleSelector.

Determines whether the selector arrow icon/image is displayed and can be pressed.

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
bShowTitleSelector boolean false

New value for property showTitleSelector

setTitle

Sets a new value for property title.

Determines the title of the ObjectHeader.

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

Param Type DefaultValue Description
sTitle string

New value for property title

setTitleActive

Sets a new value for property titleActive.

Determines whether the title of the ObjectHeader is clickable and is set only if a title is provided.

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

Param Type DefaultValue Description
bTitleActive boolean

New value for property titleActive

setTitleHref

Sets a new value for property titleHref.

Defines the title link target URI. Supports standard hyperlink behavior.

Note: If an action should be triggered, this property should not be set, but instead an event handler for the titlePress event should be registered.

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

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

New value for property titleHref

setTitleLevel

Sets a new value for property titleLevel.

Defines the semantic level of the title.

This information is used by assistive technologies, such as screen readers to create a hierarchical site map for faster navigation. Depending on this setting an HTML h1-h6 element is used.

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

Default value is H1.

Param Type DefaultValue Description
sTitleLevel sap.ui.core.TitleLevel H1

New value for property titleLevel

setTitleSelectorTooltip

Sets the new text for the tooltip of the select title arrow to the internal aggregation

Param Type DefaultValue Description
sTooltip string

the tooltip of the title selector

setTitleTarget

Sets a new value for property titleTarget.

Determines the target attribute for the title link. Options are _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered.

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

Param Type DefaultValue Description
sTitleTarget string

New value for property titleTarget

setTitleTextDirection

Sets a new value for property titleTextDirection.

Specifies the title text directionality with enumerated options. By default, the control inherits text direction from the DOM.

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

Default value is Inherit.

Param Type DefaultValue Description
sTitleTextDirection sap.ui.core.TextDirection Inherit

New value for property titleTextDirection