abstract class sap.m.semantic.SemanticPage

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/m/semantic/SemanticPage
Application Component: CA-UI5-CTR

An enhanced sap.m.Page, that can contain controls with semantic meaning, see sap.m.semantic.SemanticControl.

Note: This control implements the SAP Fiori 1.0 design guidelines. For SAP Fiori 2.0, see the sap.f.semantic.SemanticPage.

Overview

The main functionality of the SemanticPage is to predefine the placement, behavior and styles of the page elements.

Content specified in the semantic aggregations will be automatically positioned in dedicated sections of the footer or the header of the page.

Structure

The semantics of the content are the following:

In addition to the predefined semantic controls, the SemanticPage can host also custom app controls. It preserves most of the API of the sap.m.Page for specifying page content.

Usage

The app developer only has to specify the action type, and the required styling and positioning are automatically added.

Documentation links:

This control can be a drop target.

Constructor

Constructor for a new SemanticPage.

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.semantic.SemanticPage(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.PageBackgroundDesign Standard

Determines the backgound color of the page. For more information, see sap.m.Page#backgroundDesign.

Since: 1.52.

Visibility: public
enableScrolling boolean true

See sap.m.Page#enableScrolling

Visibility: public
floatingFooter boolean false

Determines whether the floating footer behavior is enabled. If set to true, the content is visible when it's underneath the footer.

Since: 1.40.1.

Visibility: public
semanticRuleSet sap.m.semantic.SemanticRuleSetType Classic

Declares the type of semantic ruleset that will govern the styling and positioning of semantic content.

Since: 1.44.

Visibility: public
showFooter boolean true

Hides or shows the page footer

Visibility: public
showNavButton boolean false

See sap.m.Page#showNavButton

Visibility: public
showSubHeader boolean true

See sap.m.Page#showSubHeader

Visibility: public
title string

See sap.m.Page#title

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

See sap.m.Page#titleLevel

Visibility: public

Aggregations

Default Aggregation: content

Name Cardinality Type Description
_page 0..1 sap.m.Page

Wrapped instance of sap.m.Page

content (default) 0..n sap.ui.core.Control

See sap.m.Page#content

customFooterContent 0..n sap.m.Button

Custom footer buttons

customHeaderContent 0..n sap.m.Button

Custom header buttons

landmarkInfo 0..1 sap.m.PageAccessibleLandmarkInfo

Accessible landmark settings to be applied to the containers of the sap.m.Page control.

If not set, no landmarks will be written.

subHeader 0..1 sap.m.IBar

See sap.m.Page#subHeader


Events Overview

Event Description
navButtonPress

See sap.m.Page#navButtonPress

navButtonPress

See sap.m.Page#navButtonPress

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

Methods Overview

Method Description
addContent

Adds some content to the aggregation content.

addCustomFooterContent

Adds some customFooterContent to the aggregation customFooterContent.

addCustomHeaderContent

Adds some customHeaderContent to the aggregation customHeaderContent.

attachNavButtonPress

Attaches event handler fnFunction to the navButtonPress event of this sap.m.semantic.SemanticPage.

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.semantic.SemanticPage itself.

See sap.m.Page#navButtonPress

destroyContent

Destroys all the content in the aggregation content.

destroyCustomFooterContent

Destroys all the customFooterContent in the aggregation customFooterContent.

destroyCustomHeaderContent

Destroys all the customHeaderContent in the aggregation customHeaderContent.

destroyLandmarkInfo

Destroys the landmarkInfo in the aggregation landmarkInfo.

destroySubHeader

Destroys the subHeader in the aggregation subHeader.

detachNavButtonPress

Detaches event handler fnFunction from the navButtonPress event of this sap.m.semantic.SemanticPage.

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

sap.m.semantic.SemanticPage.extend

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

fireNavButtonPress

Fires event navButtonPress to attached listeners.

getBackgroundDesign

Gets current value of property backgroundDesign.

Determines the backgound color of the page. For more information, see sap.m.Page#backgroundDesign.

Default value is Standard.

getContent

Gets content of aggregation content.

See sap.m.Page#content

getCustomFooterContent

Gets content of aggregation customFooterContent.

Custom footer buttons

getCustomHeaderContent

Gets content of aggregation customHeaderContent.

Custom header buttons

getEnableScrolling

Gets current value of property enableScrolling.

See sap.m.Page#enableScrolling

Default value is true.

getFloatingFooter

Gets current value of property floatingFooter.

Determines whether the floating footer behavior is enabled. If set to true, the content is visible when it's underneath the footer.

Default value is false.

getLandmarkInfo

Gets content of aggregation landmarkInfo.

Accessible landmark settings to be applied to the containers of the sap.m.Page control.

If not set, no landmarks will be written.

sap.m.semantic.SemanticPage.getMetadata

Returns a metadata object for class sap.m.semantic.SemanticPage.

getSemanticRuleSet

Gets current value of property semanticRuleSet.

Declares the type of semantic ruleset that will govern the styling and positioning of semantic content.

Default value is Classic.

getShowFooter

Gets current value of property showFooter.

Hides or shows the page footer

Default value is true.

getShowNavButton

Gets current value of property showNavButton.

See sap.m.Page#showNavButton

Default value is false.

getShowSubHeader

Gets current value of property showSubHeader.

See sap.m.Page#showSubHeader

Default value is true.

getSubHeader

Gets content of aggregation subHeader.

See sap.m.Page#subHeader

getTitle

Gets current value of property title.

See sap.m.Page#title

getTitleLevel

Gets current value of property titleLevel.

See sap.m.Page#titleLevel

Default value is Auto.

indexOfContent

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

indexOfCustomFooterContent

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

indexOfCustomHeaderContent

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

insertContent

Inserts a content into the aggregation content.

insertCustomFooterContent

Inserts a customFooterContent into the aggregation customFooterContent.

insertCustomHeaderContent

Inserts a customHeaderContent into the aggregation customHeaderContent.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeAllCustomFooterContent

Removes all the controls from the aggregation customFooterContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllCustomHeaderContent

Removes all the controls from the aggregation customHeaderContent.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

removeCustomFooterContent

Removes a customFooterContent from the aggregation customFooterContent.

removeCustomHeaderContent

Removes a customHeaderContent from the aggregation customHeaderContent.

setBackgroundDesign

Sets a new value for property backgroundDesign.

Determines the backgound color of the page. For more information, see sap.m.Page#backgroundDesign.

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

Default value is Standard.

setEnableScrolling

Sets a new value for property enableScrolling.

See sap.m.Page#enableScrolling

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

Default value is true.

setFloatingFooter

Sets a new value for property floatingFooter.

Determines whether the floating footer behavior is enabled. If set to true, the content is visible when it's underneath the footer.

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

Default value is false.

setLandmarkInfo

Sets the aggregated landmarkInfo.

setSemanticRuleSet

Sets a new value for property semanticRuleSet.

Declares the type of semantic ruleset that will govern the styling and positioning of semantic content.

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

Default value is Classic.

setShowFooter

Sets a new value for property showFooter.

Hides or shows the page footer

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

Default value is true.

setShowNavButton

Sets a new value for property showNavButton.

See sap.m.Page#showNavButton

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

Default value is false.

setShowSubHeader

Sets a new value for property showSubHeader.

See sap.m.Page#showSubHeader

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

Default value is true.

setSubHeader

Sets the aggregated subHeader.

setTitle

Sets a new value for property title.

See sap.m.Page#title

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.

See sap.m.Page#titleLevel

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

Default value is Auto.

addContent

Adds some content to the aggregation content.

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

The content to add; if empty, nothing is inserted

addCustomFooterContent

Adds some customFooterContent to the aggregation customFooterContent.

Param Type DefaultValue Description
oCustomFooterContent sap.m.Button

The customFooterContent to add; if empty, nothing is inserted

addCustomHeaderContent

Adds some customHeaderContent to the aggregation customHeaderContent.

Param Type DefaultValue Description
oCustomHeaderContent sap.m.Button

The customHeaderContent to add; if empty, nothing is inserted

attachNavButtonPress

Attaches event handler fnFunction to the navButtonPress event of this sap.m.semantic.SemanticPage.

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.semantic.SemanticPage itself.

See sap.m.Page#navButtonPress

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.semantic.SemanticPage itself

destroyContent

Destroys all the content in the aggregation content.

destroyCustomFooterContent

Destroys all the customFooterContent in the aggregation customFooterContent.

destroyCustomHeaderContent

Destroys all the customHeaderContent in the aggregation customHeaderContent.

destroyLandmarkInfo

Destroys the landmarkInfo in the aggregation landmarkInfo.

destroySubHeader

Destroys the subHeader in the aggregation subHeader.

detachNavButtonPress

Detaches event handler fnFunction from the navButtonPress event of this sap.m.semantic.SemanticPage.

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.semantic.SemanticPage.extend

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

fireNavButtonPress

Fires event navButtonPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getBackgroundDesign

Gets current value of property backgroundDesign.

Determines the backgound color of the page. For more information, see sap.m.Page#backgroundDesign.

Default value is Standard.

getContent

Gets content of aggregation content.

See sap.m.Page#content

getCustomFooterContent

Gets content of aggregation customFooterContent.

Custom footer buttons

getCustomHeaderContent

Gets content of aggregation customHeaderContent.

Custom header buttons

getEnableScrolling

Gets current value of property enableScrolling.

See sap.m.Page#enableScrolling

Default value is true.

getFloatingFooter

Gets current value of property floatingFooter.

Determines whether the floating footer behavior is enabled. If set to true, the content is visible when it's underneath the footer.

Default value is false.

getLandmarkInfo

Gets content of aggregation landmarkInfo.

Accessible landmark settings to be applied to the containers of the sap.m.Page control.

If not set, no landmarks will be written.

sap.m.semantic.SemanticPage.getMetadata

Returns a metadata object for class sap.m.semantic.SemanticPage.

getSemanticRuleSet

Gets current value of property semanticRuleSet.

Declares the type of semantic ruleset that will govern the styling and positioning of semantic content.

Default value is Classic.

getShowFooter

Gets current value of property showFooter.

Hides or shows the page footer

Default value is true.

getShowNavButton

Gets current value of property showNavButton.

See sap.m.Page#showNavButton

Default value is false.

getShowSubHeader

Gets current value of property showSubHeader.

See sap.m.Page#showSubHeader

Default value is true.

getSubHeader

Gets content of aggregation subHeader.

See sap.m.Page#subHeader

getTitle

Gets current value of property title.

See sap.m.Page#title

getTitleLevel

Gets current value of property titleLevel.

See sap.m.Page#titleLevel

Default value is Auto.

indexOfContent

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

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

The content whose index is looked for

indexOfCustomFooterContent

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

Param Type DefaultValue Description
oCustomFooterContent sap.m.Button

The customFooterContent whose index is looked for

indexOfCustomHeaderContent

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

Param Type DefaultValue Description
oCustomHeaderContent sap.m.Button

The customHeaderContent whose index is looked for

insertContent

Inserts a content into the aggregation content.

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

The content to insert; if empty, nothing is inserted

iIndex int

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

insertCustomFooterContent

Inserts a customFooterContent into the aggregation customFooterContent.

Param Type DefaultValue Description
oCustomFooterContent sap.m.Button

The customFooterContent to insert; if empty, nothing is inserted

iIndex int

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

insertCustomHeaderContent

Inserts a customHeaderContent into the aggregation customHeaderContent.

Param Type DefaultValue Description
oCustomHeaderContent sap.m.Button

The customHeaderContent to insert; if empty, nothing is inserted

iIndex int

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

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeAllCustomFooterContent

Removes all the controls from the aggregation customFooterContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllCustomHeaderContent

Removes all the controls from the aggregation customHeaderContent.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

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

The content to remove or its index or id

removeCustomFooterContent

Removes a customFooterContent from the aggregation customFooterContent.

Param Type DefaultValue Description
vCustomFooterContent int string sap.m.Button

The customFooterContent to remove or its index or id

removeCustomHeaderContent

Removes a customHeaderContent from the aggregation customHeaderContent.

Param Type DefaultValue Description
vCustomHeaderContent int string sap.m.Button

The customHeaderContent to remove or its index or id

setBackgroundDesign

Sets a new value for property backgroundDesign.

Determines the backgound color of the page. For more information, see sap.m.Page#backgroundDesign.

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

Default value is Standard.

Param Type DefaultValue Description
sBackgroundDesign sap.m.PageBackgroundDesign Standard

New value for property backgroundDesign

setEnableScrolling

Sets a new value for property enableScrolling.

See sap.m.Page#enableScrolling

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

New value for property enableScrolling

setFloatingFooter

Sets a new value for property floatingFooter.

Determines whether the floating footer behavior is enabled. If set to true, the content is visible when it's underneath the footer.

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

New value for property floatingFooter

setLandmarkInfo

Sets the aggregated landmarkInfo.

Param Type DefaultValue Description
oLandmarkInfo sap.m.PageAccessibleLandmarkInfo

The landmarkInfo to set

setSemanticRuleSet

Sets a new value for property semanticRuleSet.

Declares the type of semantic ruleset that will govern the styling and positioning of semantic content.

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

Default value is Classic.

Param Type DefaultValue Description
sSemanticRuleSet sap.m.semantic.SemanticRuleSetType Classic

New value for property semanticRuleSet

setShowFooter

Sets a new value for property showFooter.

Hides or shows the page footer

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

New value for property showFooter

setShowNavButton

Sets a new value for property showNavButton.

See sap.m.Page#showNavButton

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

New value for property showNavButton

setShowSubHeader

Sets a new value for property showSubHeader.

See sap.m.Page#showSubHeader

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

New value for property showSubHeader

setSubHeader

Sets the aggregated subHeader.

Param Type DefaultValue Description
oSubHeader sap.m.IBar

The subHeader to set

setTitle

Sets a new value for property title.

See sap.m.Page#title

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

setTitleLevel

Sets a new value for property titleLevel.

See sap.m.Page#titleLevel

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

Default value is Auto.

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

New value for property titleLevel