Class sap.ui.core.UIAreaModule: sap/ui/core/UIArea


An area in a page that hosts a tree of UI elements.

Provides means for event-handling, rerendering, etc.

Special aggregation "dependents" is connected to the lifecycle management and databinding, but not rendered automatically and can be used for popups or other dependent controls. This allows definition of popup controls in declarative views and enables propagation of model and context information to them.

Constructor Summary
new sap.ui.core.UIArea(oCore, oRootNode?)Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers.
Method Summary
sap.ui.core.UIArea.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.core.UIArea with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.core.UIArea.getMetadata()Returns a metadata object for class sap.ui.core.UIArea.
addContent(oContent)Adds some content to the aggregation content.
addDependent(oDependent)Adds some dependent to the aggregation dependents.
destroyContent()Destroys all the content in the aggregation content.
destroyDependents()Destroys all the dependents in the aggregation dependents.
getBindingContext()Provide getBindingContext, as UIArea can be parent of an element.
getContent()Gets content of aggregation content.
getDependents()Gets content of aggregation dependents.
getEventingParent()Returns the Core's event provider as new eventing parent to enable control event bubbling to the core to ensure compatibility with the core validation events.
getId()Returns this UIArea's id (as determined from provided RootNode).
getRootNode()Returns the Root Node hosting this instance of UIArea.
getUIArea()Returns this UI area.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
indexOfDependent(oDependent)Checks for the provided sap.ui.core.Control in the aggregation dependents.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
insertDependent(oDependent, iIndex)Inserts a dependent into the aggregation dependents.
invalidate()Will be used as end-point for invalidate-bubbling from controls up their hierarchy.
isActive()Checks whether the control is still valid (is in the DOM)
isInvalidateSuppressed()Returns whether rerendering is currently suppressed on this UIArea
isLocked()Returns the locked state of the sap.ui.core.UIArea
lock()Locks this instance of UIArea.
removeAllContent()Removes all the controls from the aggregation content.
removeAllDependents()Removes all the controls from the aggregation dependents.
removeContent(vContent)Removes a content from the aggregation content.
removeDependent(vDependent)Removes a dependent from the aggregation dependents.
setRootNode(oRootNode)Allows setting the Root Node hosting this instance of UIArea.
unlock()Un-Locks this instance of UIArea.
getRootControl(idx)Returns the content control of this UIArea at the specified index.
setRootControl(oRootControl)Sets the root control to be displayed in this UIArea.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.core.UIArea(oCore, oRootNode?)

Accepts an object literal mSettings that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.base.ManagedObject can be used as well.

Parameters:
{sap.ui.core.Core}oCore internal API of the Core that manages this UIArea
{object}oRootNode? reference to the Dom Node that should be 'hosting' the UI Area.
Method Detail
sap.ui.core.UIArea.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.core.UIArea 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.base.ManagedObject.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.core.UIArea.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.core.UIArea.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addContent(oContent): sap.ui.core.UIArea
Adds some content to the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to add; if empty, nothing is inserted
Returns:
{sap.ui.core.UIArea} Reference to this in order to allow method chaining
addDependent(oDependent): sap.ui.core.UIArea
Adds some dependent to the aggregation dependents.
Parameters:
{sap.ui.core.Control}oDependent the dependent to add; if empty, nothing is inserted
Returns:
{sap.ui.core.UIArea} Reference to this in order to allow method chaining
destroyContent(): sap.ui.core.UIArea
Destroys all the content in the aggregation content.
Returns:
{sap.ui.core.UIArea} Reference to this in order to allow method chaining
destroyDependents(): sap.ui.core.UIArea
Destroys all the dependents in the aggregation dependents.
Returns:
{sap.ui.core.UIArea} Reference to this in order to allow method chaining
getBindingContext(): null
Provide getBindingContext, as UIArea can be parent of an element.
Returns:
{null} Always returns null.
getContent(): sap.ui.core.Control[]
Gets content of aggregation content.

Content that is displayed in the UIArea.

Returns:
{sap.ui.core.Control[]}
getDependents(): sap.ui.core.Control[]
Gets content of aggregation dependents.

Dependent objects whose lifecycle is bound to the UIarea but which are not automatically rendered by the UIArea.

Returns:
{sap.ui.core.Control[]}
getEventingParent(): sap.ui.base.EventProvider
Returns the Core's event provider as new eventing parent to enable control event bubbling to the core to ensure compatibility with the core validation events.
Returns:
{sap.ui.base.EventProvider} the parent event provider
getId(): string|null
Returns this UIArea's id (as determined from provided RootNode).
Returns:
{string|null} id of this UIArea
getRootNode(): Element
Returns the Root Node hosting this instance of UIArea.
Returns:
{Element} the Root Node hosting this instance of UIArea.
getUIArea(): sap.ui.core.UIArea
Returns this UI area. Needed to stop recursive calls from an element to its parent.
Returns:
{sap.ui.core.UIArea} this
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oContent The content whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfDependent(oDependent): int
Checks for the provided sap.ui.core.Control in the aggregation dependents. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oDependent The dependent whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.ui.core.UIArea
Inserts a content into the aggregation content.
Parameters:
{sap.ui.core.Control}oContent the content to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.core.UIArea} Reference to this in order to allow method chaining
insertDependent(oDependent, iIndex): sap.ui.core.UIArea
Inserts a dependent into the aggregation dependents.
Parameters:
{sap.ui.core.Control}oDependent the dependent to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the dependent should be inserted at; for a negative value of iIndex, the dependent is inserted at position 0; for a value greater than the current size of the aggregation, the dependent is inserted at the last position
Returns:
{sap.ui.core.UIArea} Reference to this in order to allow method chaining
invalidate()
Will be used as end-point for invalidate-bubbling from controls up their hierarchy.
Triggers re-rendering of the UIAreas content.
isActive(): boolean
Checks whether the control is still valid (is in the DOM)
Returns:
{boolean} True if the control is still in the active DOM
isInvalidateSuppressed()
Returns whether rerendering is currently suppressed on this UIArea
isLocked(): boolean
Returns the locked state of the sap.ui.core.UIArea
Returns:
{boolean} locked state
lock()
Locks this instance of UIArea.

Rerendering and eventing will not be active as long as no unlock is called.

removeAllContent(): sap.ui.core.Control[]
Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeAllDependents(): sap.ui.core.Control[]
Removes all the controls from the aggregation dependents.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
{int|string|sap.ui.core.Control}vContent The contentto remove or its index or id
Returns:
{sap.ui.core.Control} The removed content or null
removeDependent(vDependent): sap.ui.core.Control
Removes a dependent from the aggregation dependents.
Parameters:
{int|string|sap.ui.core.Control}vDependent The dependentto remove or its index or id
Returns:
{sap.ui.core.Control} The removed dependent or null
setRootNode(oRootNode)
Allows setting the Root Node hosting this instance of UIArea.
The Dom Ref must have an Id that will be used as Id for this instance of UIArea.
Parameters:
{object}oRootNode the hosting Dom Ref for this instance of UIArea.
unlock()
Un-Locks this instance of UIArea.

Rerendering and eventing will now be enabled again.

getRootControl(idx): sap.ui.core.Control
Returns the content control of this UIArea at the specified index. If no index is given the first content control is returned.
Parameters:
{int}idx index of the control in the content of this UIArea
Deprecated:
use function getContent instead
Returns:
{sap.ui.core.Control} the content control of this UIArea at the specified index.
setRootControl(oRootControl)
Sets the root control to be displayed in this UIArea.

First, all old content controls (if any) will be detached from this UIArea (e.g. their parent relationship to this UIArea will be cut off). Then the parent relationship for the new content control (if not empty) will be set to this UIArea and finally, the UIArea will be marked for re-rendering.

The real re-rendering happens whenever the re-rendering is called. Either implicitly at the end of any control event or by calling sap.ui.getCore().applyChanges().

Parameters:
{sap.ui.base.Interface|sap.ui.core.Control}oRootControl the Control that should be the Root for this UIArea.
Deprecated:
use functions removeAllContent and addContent instead