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.
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.
The semantics of the content are the following:
AddAction
will be styled as an icon button)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.
The app developer only has to specify the action type, and the required styling and positioning are automatically added.
Documentation links:
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 |
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. |
enableScrolling | boolean | true | Visibility: public |
floatingFooter | boolean | false | Determines whether the floating footer behavior is enabled. If set to |
semanticRuleSet | sap.m.semantic.SemanticRuleSetType | Classic | Declares the type of semantic ruleset that will govern the styling and positioning of semantic content. |
showFooter | boolean | true | Hides or shows the page footer Visibility: public |
showNavButton | boolean | false | Visibility: public |
showSubHeader | boolean | true | Visibility: public |
title | string | See sap.m.Page#title Visibility: public |
|
titleLevel | sap.ui.core.TitleLevel | Auto | Visibility: public |
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 | |
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 If not set, no landmarks will be written. |
subHeader | 0..1 | sap.m.IBar |
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 When called, the context of the event handler (its |
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 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
|
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 |
getContent |
Gets content of aggregation 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 |
getFloatingFooter |
Gets current value of property floatingFooter. Determines whether the floating footer behavior is enabled. If set to Default value is |
getLandmarkInfo |
Gets content of aggregation landmarkInfo. Accessible landmark settings to be applied to the containers of the 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 |
getShowFooter |
Gets current value of property showFooter. Hides or shows the page footer Default value is |
getShowNavButton |
Gets current value of property showNavButton. Default value is |
getShowSubHeader |
Gets current value of property showSubHeader. Default value is |
getSubHeader |
Gets content of aggregation subHeader. |
getTitle |
Gets current value of property title. See sap.m.Page#title |
getTitleLevel |
Gets current value of property titleLevel. Default value is |
indexOfContent |
Checks for the provided |
indexOfCustomFooterContent |
Checks for the provided |
indexOfCustomHeaderContent |
Checks for the provided |
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 Default value is |
setEnableScrolling |
Sets a new value for property enableScrolling. See sap.m.Page#enableScrolling When called with a value of Default value is |
setFloatingFooter |
Sets a new value for property floatingFooter. Determines whether the floating footer behavior is enabled. If set to When called with a value of Default value is |
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 Default value is |
setShowFooter |
Sets a new value for property showFooter. Hides or shows the page footer When called with a value of Default value is |
setShowNavButton |
Sets a new value for property showNavButton. When called with a value of Default value is |
setShowSubHeader |
Sets a new value for property showSubHeader. When called with a value of Default value is |
setSubHeader |
Sets the aggregated subHeader. |
setTitle |
Sets a new value for property title. See sap.m.Page#title When called with a value of |
setTitleLevel |
Sets a new value for property titleLevel. When called with a value of Default value is |
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 |
Adds some customHeaderContent to the aggregation customHeaderContent.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCustomHeaderContent | sap.m.Button |
The customHeaderContent to add; if empty, nothing is inserted |
Destroys all the customHeaderContent in the aggregation customHeaderContent.
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 |
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
.
Gets current value of property enableScrolling.
See sap.m.Page#enableScrolling
Default value is true
.
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.
Returns a metadata object for class sap.m.semantic.SemanticPage.
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
.
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 |
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 |
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 |
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 |
Removes all the controls from the aggregation content.
Additionally, it unregisters them from the hosting UIArea.
Removes all the controls from the aggregation customHeaderContent.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
Sets the aggregated landmarkInfo.
Param | Type | DefaultValue | Description |
---|---|---|---|
oLandmarkInfo | sap.m.PageAccessibleLandmarkInfo |
The landmarkInfo to set |
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 |
Sets a new value for property 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 |
Sets the aggregated subHeader.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSubHeader | sap.m.IBar |
The subHeader to set |
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 |
Sets a new value for property 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 |