class sap.uxap.ObjectPageLazyLoader

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

A helper element that enables a "stashed-based" lazy loading approach for the content of the sap.uxap.ObjectPageSubSection control.

ObjectPageLazyLoader is intended to be used in a declarative way only (for example, in a view) with the stashed property set to true, and is recommended to be used only once per subsection as its sole content.

ObjectPageLazyLoader utilizes UI5's stashing mechanism and is a lightweight alternative to the native block-based Lazy Loading of the ObjectPageLayout. Wrapping the content of a subsection in an ObjectPageLazyLoader with stashed=true will make the content unstash automatically as the user scrolls.

Note: Subsections are required to have an ID when used with ObjectPageLazyLoader.


Constructor

Constructor for a new ObjectPageLazyLoader.

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.ObjectPageLazyLoader(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


Aggregations

Default Aggregation: content

Name Cardinality Type Description
content (default) 0..n sap.ui.core.Control

Controls to be displayed after this element is unstashed


Methods Overview

Method Description
addContent

Adds some content to the aggregation content.

destroyContent

Destroys all the content in the aggregation content.

sap.uxap.ObjectPageLazyLoader.extend

Creates a new subclass of class sap.uxap.ObjectPageLazyLoader 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.Element.extend.

getContent

Gets content of aggregation content.

Controls to be displayed after this element is unstashed

sap.uxap.ObjectPageLazyLoader.getMetadata

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

indexOfContent

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

insertContent

Inserts a content into the aggregation content.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

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

destroyContent

Destroys all the content in the aggregation content.

sap.uxap.ObjectPageLazyLoader.extend

Creates a new subclass of class sap.uxap.ObjectPageLazyLoader 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.Element.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

getContent

Gets content of aggregation content.

Controls to be displayed after this element is unstashed

sap.uxap.ObjectPageLazyLoader.getMetadata

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

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

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

removeAllContent

Removes all the controls from the aggregation content.

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