class sap.ui.ux3.CollectionInspector

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/ux3/CollectionInspector
Application Component: CA-UI5-CTR

CollectionInspector


Constructor

Constructor for a new CollectionInspector.

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.ui.ux3.CollectionInspector(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
fitParent boolean true

If set to true, control will fit parents content area

Visibility: public
sidebarVisible boolean true

Defines if the list of collection items is visible on the left

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
collections 0..n sap.ui.ux3.Collection

Collections which are displayed in the COllectionInspector

content 0..n sap.ui.core.Control

All controls that are currently displayed


Associations

Name Cardinality Type Description
selectedCollection 0..1 sap.ui.ux3.Collection

Collection which is currently selected


Events Overview

Event Description
collectionSelected

Event is fired if user selects a collection

editCollection

Fires when the edit button is clicked

itemSelectionChanged

Fires when an item in a collection is selected

collectionSelected

Event is fired if user selects a collection

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

editCollection

Fires when the edit button is clicked

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

itemSelectionChanged

Fires when an item in a collection is selected

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

Methods Overview

Method Description
addCollection

Adds some collection oCollection to the aggregation named collections.

addContent

Adds some content oContent to the aggregation named content.

attachCollectionSelected

Attaches event handler fnFunction to the collectionSelected event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector itself.

Event is fired if user selects a collection

attachEditCollection

Attaches event handler fnFunction to the editCollection event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector itself.

Fires when the edit button is clicked

attachItemSelectionChanged

Attaches event handler fnFunction to the itemSelectionChanged event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector itself.

Fires when an item in a collection is selected

closeSidebar

Closes the siedebar

destroyCollections

Destroys the collection aggregation

destroyContent

Destroys all the content in the aggregation named content.

detachCollectionSelected

Detaches event handler fnFunction from the collectionSelected event of this sap.ui.ux3.CollectionInspector.

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

detachEditCollection

Detaches event handler fnFunction from the editCollection event of this sap.ui.ux3.CollectionInspector.

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

detachItemSelectionChanged

Detaches event handler fnFunction from the itemSelectionChanged event of this sap.ui.ux3.CollectionInspector.

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

sap.ui.ux3.CollectionInspector.extend

Creates a new subclass of class sap.ui.ux3.CollectionInspector 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.

fireCollectionSelected

Fires event collectionSelected to attached listeners.

fireEditCollection

Fires event editCollection to attached listeners.

fireItemSelectionChanged

Fires event itemSelectionChanged to attached listeners.

getCollections

Gets content of aggregation collections.

Collections which are displayed in the COllectionInspector

getContent

Gets content of aggregation content.

All controls that are currently displayed

getEditButton

Return the edit button

getFitParent

Gets current value of property fitParent.

If set to true, control will fit parents content area

Default value is true.

sap.ui.ux3.CollectionInspector.getMetadata

Returns a metadata object for class sap.ui.ux3.CollectionInspector.

getSelectedCollection

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

getSidebarVisible

Gets current value of property sidebarVisible.

Defines if the list of collection items is visible on the left

Default value is true.

indexOfCollection

Checks for the provided sap.ui.ux3.Collection in the aggregation collections. and returns its index if found or -1 otherwise.

indexOfContent

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

insertCollection

Inserts a collection into the aggregation named collections.

insertContent

Inserts a content into the aggregation named content.

openSidebar

Opens the sidebar

removeAllCollections

Removes all the controls in the aggregation named collections.
Additionally unregisters them from the hosting UIArea.

removeAllContent

Removes all the controls in the aggregation named content.
Additionally unregisters them from the hosting UIArea.

removeCollection

Removes a collection from the aggregation named collections.

removeContent

Removes a content from the aggregation named content.

setFitParent

Sets a new value for property fitParent.

If set to true, control will fit parents content area

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

Default value is true.

setSelectedCollection

Sets the associated selectedCollection.

setSidebarVisible

Sets a new value for property sidebarVisible.

Defines if the list of collection items is visible on the left

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

Default value is true.

addCollection

Adds some collection oCollection to the aggregation named collections.

Param Type DefaultValue Description
oCollection sap.ui.ux3.Collection

the collection to add; if empty, nothing is inserted

addContent

Adds some content oContent to the aggregation named content.

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

the content to add; if empty, nothing is inserted

attachCollectionSelected

Attaches event handler fnFunction to the collectionSelected event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector itself.

Event is fired if user selects a collection

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.ui.ux3.CollectionInspector itself

attachEditCollection

Attaches event handler fnFunction to the editCollection event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector itself.

Fires when the edit button is clicked

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.ui.ux3.CollectionInspector itself

attachItemSelectionChanged

Attaches event handler fnFunction to the itemSelectionChanged event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector itself.

Fires when an item in a collection is selected

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.ui.ux3.CollectionInspector itself

closeSidebar

Closes the siedebar

destroyCollections

Destroys the collection aggregation

destroyContent

Destroys all the content in the aggregation named content.

detachCollectionSelected

Detaches event handler fnFunction from the collectionSelected event of this sap.ui.ux3.CollectionInspector.

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

detachEditCollection

Detaches event handler fnFunction from the editCollection event of this sap.ui.ux3.CollectionInspector.

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

detachItemSelectionChanged

Detaches event handler fnFunction from the itemSelectionChanged event of this sap.ui.ux3.CollectionInspector.

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.ui.ux3.CollectionInspector.extend

Creates a new subclass of class sap.ui.ux3.CollectionInspector 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

fireCollectionSelected

Fires event collectionSelected to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireEditCollection

Fires event editCollection to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireItemSelectionChanged

Fires event itemSelectionChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getCollections

Gets content of aggregation collections.

Collections which are displayed in the COllectionInspector

getContent

Gets content of aggregation content.

All controls that are currently displayed

getEditButton

Return the edit button

getFitParent

Gets current value of property fitParent.

If set to true, control will fit parents content area

Default value is true.

sap.ui.ux3.CollectionInspector.getMetadata

Returns a metadata object for class sap.ui.ux3.CollectionInspector.

getSelectedCollection

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

getSidebarVisible

Gets current value of property sidebarVisible.

Defines if the list of collection items is visible on the left

Default value is true.

indexOfCollection

Checks for the provided sap.ui.ux3.Collection in the aggregation collections. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oCollection sap.ui.ux3.Collection

The collection whose index is looked for

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

insertCollection

Inserts a collection into the aggregation named collections.

Param Type DefaultValue Description
oCollection sap.ui.ux3.Collection

the collection to insert; if empty, nothing is inserted

iIndex int

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

insertContent

Inserts a content into the aggregation named 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

openSidebar

Opens the sidebar

removeAllCollections

Removes all the controls in the aggregation named collections.
Additionally unregisters them from the hosting UIArea.

removeAllContent

Removes all the controls in the aggregation named content.
Additionally unregisters them from the hosting UIArea.

removeCollection

Removes a collection from the aggregation named collections.

Param Type DefaultValue Description
vCollection int string sap.ui.ux3.Collection

the collection to remove or its index or id

removeContent

Removes a content from the aggregation named content.

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

the content to remove or its index or id

setFitParent

Sets a new value for property fitParent.

If set to true, control will fit parents content area

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

New value for property fitParent

setSelectedCollection

Sets the associated selectedCollection.

Param Type DefaultValue Description
oSelectedCollection sap.ui.core.ID sap.ui.ux3.Collection

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

setSidebarVisible

Sets a new value for property sidebarVisible.

Defines if the list of collection items is visible on the left

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

New value for property sidebarVisible