class sap.uxap.ObjectPageSection

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/uxap/ObjectPageSection
Application Component: CA-UI5-CTR

Top-level information container of an sap.uxap.ObjectPageLayout.

The ObjectPageSection's purpose is to aggregate subsections.

Note: This control is intended to be used only as part of the ObjectPageLayout.


Constructor

Constructor for a new ObjectPageSection.

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.uxap.ObjectPageSection(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
showTitle boolean true

Determines whether to display the Section title or not.

Visibility: public
titleUppercase boolean true

Determines whether the Section title is displayed in upper case.

Visibility: public

Borrowed Properties

Name Type Default Value Description
importance sap.uxap.Importance High

Determines whether the section will be hidden on low resolutions.

Since: 1.32.0.

Visibility: public
title string

Defines the title of the respective section/subsection.

Note: If a subsection is the only one (or the only one visible) within a section, its title is displayed instead of the section title. This behavior is true even if the showTitle propeprty of sap.uxap.ObjectPageSubSection is set to false.

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

Determines the ARIA level of the ObjectPageSectionBase title. The ARIA level is used by assisting technologies, such as screen readers, to create a hierarchical site map for faster navigation.

Note: Defining a titleLevel will add aria-level attribute from 1 to 6, instead of changing the ObjectPageSectionBase title HTML tag from H1 to H6.
For example: if titleLevel is TitleLevel.H1, it will result as aria-level of 1 added to the ObjectPageSectionBase title.

Since: 1.44.0.

Visibility: public
visible boolean true

Invisible ObjectPageSectionBase are not rendered

Visibility: public

Aggregations

Default Aggregation: subSections

Name Cardinality Type Description
_showHideAllButton 0..1 sap.m.Button
_showHideButton 0..1 sap.m.Button
subSections (default) 0..n sap.uxap.ObjectPageSubSection

The list of Subsections.

Borrowed Aggregations

Name Cardinality Type Description
customAnchorBarButton 0..1 sap.m.Button

The custom button that will provide a link to the section in the ObjectPageLayout anchor bar. This button will be used as a custom template to be into the ObjectPageLayout anchorBar area, therefore property changes happening on this button template after the first rendering won't affect the actual button copy used in the anchorBar.

If you want to change some of the button properties, you would need to bind them to a model.


Associations

Name Cardinality Type Description
selectedSubSection 0..1 sap.uxap.ObjectPageSubSection

The most recently selected Subsection by the user.


Methods Overview

Method Description
addSubSection

Adds some subSection to the aggregation subSections.

destroySubSections

Destroys all the subSections in the aggregation subSections.

sap.uxap.ObjectPageSection.extend

Creates a new subclass of class sap.uxap.ObjectPageSection with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.uxap.ObjectPageSectionBase.extend.

sap.uxap.ObjectPageSection.getMetadata

Returns a metadata object for class sap.uxap.ObjectPageSection.

getSelectedSubSection

ID of the element which is the current target of the association selectedSubSection, or null.

getShowTitle

Gets current value of property showTitle.

Determines whether to display the Section title or not.

Default value is true.

getSubSections

Gets content of aggregation subSections.

The list of Subsections.

getTitleUppercase

Gets current value of property titleUppercase.

Determines whether the Section title is displayed in upper case.

Default value is true.

indexOfSubSection

Checks for the provided sap.uxap.ObjectPageSubSection in the aggregation subSections. and returns its index if found or -1 otherwise.

insertSubSection

Inserts a subSection into the aggregation subSections.

removeAllSubSections

Removes all the controls from the aggregation subSections.

Additionally, it unregisters them from the hosting UIArea.

removeSubSection

Removes a subSection from the aggregation subSections.

setSelectedSubSection

Sets the associated selectedSubSection.

setShowTitle

Sets a new value for property showTitle.

Determines whether to display the Section title or not.

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

Default value is true.

setTitleUppercase

Sets a new value for property titleUppercase.

Determines whether the Section title is displayed in upper case.

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

Default value is true.

addSubSection

Adds some subSection to the aggregation subSections.

Param Type DefaultValue Description
oSubSection sap.uxap.ObjectPageSubSection

The subSection to add; if empty, nothing is inserted

destroySubSections

Destroys all the subSections in the aggregation subSections.

sap.uxap.ObjectPageSection.extend

Creates a new subclass of class sap.uxap.ObjectPageSection with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.uxap.ObjectPageSectionBase.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

sap.uxap.ObjectPageSection.getMetadata

Returns a metadata object for class sap.uxap.ObjectPageSection.

getSelectedSubSection

ID of the element which is the current target of the association selectedSubSection, or null.

getShowTitle

Gets current value of property showTitle.

Determines whether to display the Section title or not.

Default value is true.

getSubSections

Gets content of aggregation subSections.

The list of Subsections.

getTitleUppercase

Gets current value of property titleUppercase.

Determines whether the Section title is displayed in upper case.

Default value is true.

indexOfSubSection

Checks for the provided sap.uxap.ObjectPageSubSection in the aggregation subSections. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oSubSection sap.uxap.ObjectPageSubSection

The subSection whose index is looked for

insertSubSection

Inserts a subSection into the aggregation subSections.

Param Type DefaultValue Description
oSubSection sap.uxap.ObjectPageSubSection

The subSection to insert; if empty, nothing is inserted

iIndex int

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

removeAllSubSections

Removes all the controls from the aggregation subSections.

Additionally, it unregisters them from the hosting UIArea.

removeSubSection

Removes a subSection from the aggregation subSections.

Param Type DefaultValue Description
vSubSection int string sap.uxap.ObjectPageSubSection

The subSection to remove or its index or id

setSelectedSubSection

Sets the associated selectedSubSection.

Param Type DefaultValue Description
oSelectedSubSection sap.ui.core.ID sap.uxap.ObjectPageSubSection

ID of an element which becomes the new target of this selectedSubSection association; alternatively, an element instance may be given

setShowTitle

Sets a new value for property showTitle.

Determines whether to display the Section title or not.

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

New value for property showTitle

setTitleUppercase

Sets a new value for property titleUppercase.

Determines whether the Section title is displayed in upper case.

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

New value for property titleUppercase