Class sap.ui.ux3.CollectionInspectorModule: sap/ui/ux3/CollectionInspector

extends Control

CollectionInspector

Deprecated API:Since version 1.38.


Since: 1.9.0.
Constructor Summary
new sap.ui.ux3.CollectionInspector(sId?, mSettings?)Constructor for a new CollectionInspector.
Event Summary
collectionSelected(oControlEvent)Event is fired if user selects a collection
editCollection(oControlEvent)Fires when the edit button is clicked
itemSelectionChanged(oControlEvent)Fires when an item in a collection is selected
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.CollectionInspector.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.CollectionInspector with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.CollectionInspector.getMetadata()Returns a metadata object for class sap.ui.ux3.CollectionInspector.
addCollection(oCollection)Adds some collection oCollection to the aggregation named collections.
addContent(oContent)Adds some content oContent to the aggregation named content.
attachCollectionSelected(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the collectionSelected event of this sap.ui.ux3.CollectionInspector.
attachEditCollection(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the editCollection event of this sap.ui.ux3.CollectionInspector.
attachItemSelectionChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the itemSelectionChanged event of this sap.ui.ux3.CollectionInspector.
closeSidebar()Closes the siedebar
destroyCollections()Destroys the collection aggregation
destroyContent()Destroys all the content in the aggregation named content.
detachCollectionSelected(fnFunction, oListener)Detaches event handler fnFunction from the collectionSelected event of this sap.ui.ux3.CollectionInspector.
detachEditCollection(fnFunction, oListener)Detaches event handler fnFunction from the editCollection event of this sap.ui.ux3.CollectionInspector.
detachItemSelectionChanged(fnFunction, oListener)Detaches event handler fnFunction from the itemSelectionChanged event of this sap.ui.ux3.CollectionInspector.
fireCollectionSelected(mArguments?)Fires event collectionSelected to attached listeners.
fireEditCollection(mArguments?)Fires event editCollection to attached listeners.
fireItemSelectionChanged(mArguments?)Fires event itemSelectionChanged to attached listeners.
getCollections()Gets content of aggregation collections.
getContent()Gets content of aggregation content.
getEditButton()Return the edit button
getFitParent()Gets current value of property fitParent.
getSelectedCollection()ID of the element which is the current target of the association selectedCollection, or null.
getSidebarVisible()Gets current value of property sidebarVisible.
indexOfCollection(oCollection)Checks for the provided sap.ui.ux3.Collection in the aggregation collections.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
insertCollection(oCollection, iIndex)Inserts a collection into the aggregation named collections.
insertContent(oContent, iIndex)Inserts a content into the aggregation named content.
openSidebar()Opens the sidebar
removeAllCollections()Removes all the controls in the aggregation named collections.
removeAllContent()Removes all the controls in the aggregation named content.
removeCollection(vCollection)Removes an collection from the aggregation named collections.
removeContent(vContent)Removes an content from the aggregation named content.
setFitParent(bFitParent)Sets a new value for property fitParent.
setSelectedCollection(oSelectedCollection)Sets the associated selectedCollection.
setSidebarVisible(bSidebarVisible)Sets a new value for property sidebarVisible.
Constructor Detail
new sap.ui.ux3.CollectionInspector(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

  • Properties
  • Aggregations
  • Events
    • collectionSelected : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • itemSelectionChanged : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • editCollection : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

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

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Deprecated:
Since version 1.38.
Event Detail
collectionSelected(oControlEvent)
Event is fired if user selects a collection
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
editCollection(oControlEvent)
Fires when the edit button is clicked
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
itemSelectionChanged(oControlEvent)
Fires when an item in a collection is selected
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.ux3.CollectionInspector.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

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.ux3.CollectionInspector.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.CollectionInspector.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addCollection(oCollection): sap.ui.ux3.CollectionInspector
Adds some collection oCollection to the aggregation named collections.
Parameters:
{sap.ui.ux3.Collection}oCollection the collection to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.CollectionInspector}this to allow method chaining
addContent(oContent): sap.ui.ux3.CollectionInspector
Adds some content oContent to the aggregation named content.
Parameters:
{sap.ui.core.Control}oContent the content to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.CollectionInspector}this to allow method chaining
attachCollectionSelected(oData?, fnFunction, oListener?): sap.ui.ux3.CollectionInspector
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

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.ux3.CollectionInspector itself
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
attachEditCollection(oData?, fnFunction, oListener?): sap.ui.ux3.CollectionInspector
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

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.ux3.CollectionInspector itself
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
attachItemSelectionChanged(oData?, fnFunction, oListener?): sap.ui.ux3.CollectionInspector
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

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.ux3.CollectionInspector itself
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
closeSidebar()
Closes the siedebar
destroyCollections(): sap.ui.ux3.CollectionInspector
Destroys the collection aggregation
Returns:
{sap.ui.ux3.CollectionInspector} this to allow method chaining
Destroys all the content in the aggregation named content.
Returns:
{sap.ui.ux3.CollectionInspector}this to allow method chaining
detachCollectionSelected(fnFunction, oListener): sap.ui.ux3.CollectionInspector
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
detachEditCollection(fnFunction, oListener): sap.ui.ux3.CollectionInspector
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
detachItemSelectionChanged(fnFunction, oListener): sap.ui.ux3.CollectionInspector
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
fireCollectionSelected(mArguments?): sap.ui.ux3.CollectionInspector
Fires event collectionSelected to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
fireEditCollection(mArguments?): sap.ui.ux3.CollectionInspector
Fires event editCollection to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
fireItemSelectionChanged(mArguments?): sap.ui.ux3.CollectionInspector
Fires event itemSelectionChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
getCollections(): sap.ui.ux3.Collection[]
Gets content of aggregation collections.

Collections which are displayed in the COllectionInspector

Returns:
{sap.ui.ux3.Collection[]}
getContent(): sap.ui.core.Control[]
Gets content of aggregation content.

All controls that are currently displayed

Returns:
{sap.ui.core.Control[]}
getEditButton()
Return the edit button
getFitParent(): boolean
Gets current value of property fitParent.

If set to true, control will fit parents content area

Default value is true.

Returns:
{boolean} Value of property fitParent
getSelectedCollection(): sap.ui.ux3.Collection
ID of the element which is the current target of the association selectedCollection, or null.
Returns:
{sap.ui.ux3.Collection}
getSidebarVisible(): boolean
Gets current value of property sidebarVisible.

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

Default value is true.

Returns:
{boolean} Value of property sidebarVisible
indexOfCollection(oCollection): int
Checks for the provided sap.ui.ux3.Collection in the aggregation collections. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.ux3.Collection}oCollection The collection whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
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
insertCollection(oCollection, iIndex): sap.ui.ux3.CollectionInspector
Inserts a collection into the aggregation named collections.
Parameters:
{sap.ui.ux3.Collection}oCollection the collection to insert; if empty, nothing is inserted
{int}iIndex 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
Returns:
{sap.ui.ux3.CollectionInspector}this to allow method chaining
insertContent(oContent, iIndex): sap.ui.ux3.CollectionInspector
Inserts a content into the aggregation named 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.ux3.CollectionInspector}this to allow method chaining
openSidebar()
Opens the sidebar
removeAllCollections(): sap.ui.ux3.Collection[]
Removes all the controls in the aggregation named collections.
Additionally unregisters them from the hosting UIArea.
Returns:
{sap.ui.ux3.Collection[]} an array of the removed elements (might be empty)
removeAllContent(): sap.ui.core.Control[]
Removes all the controls in the aggregation named content.
Additionally unregisters them from the hosting UIArea.
Returns:
{sap.ui.core.Control[]} an array of the removed elements (might be empty)
removeCollection(vCollection): sap.ui.ux3.Collection
Removes an collection from the aggregation named collections.
Parameters:
{int|string|sap.ui.ux3.Collection}vCollection the collection to remove or its index or id
Returns:
{sap.ui.ux3.Collection} the removed collection or null
removeContent(vContent): sap.ui.core.Control
Removes an content from the aggregation named content.
Parameters:
{int|string|sap.ui.core.Control}vContent the content to remove or its index or id
Returns:
{sap.ui.core.Control} the removed content or null
setFitParent(bFitParent): sap.ui.ux3.CollectionInspector
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.

Parameters:
{boolean}bFitParent New value for property fitParent
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
setSelectedCollection(oSelectedCollection): sap.ui.ux3.CollectionInspector
Sets the associated selectedCollection.
Parameters:
{sap.ui.ux3.Collection}oSelectedCollection Id of an element which becomes the new target of this selectedCollection association; alternatively, an element instance may be given
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining
setSidebarVisible(bSidebarVisible): sap.ui.ux3.CollectionInspector
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.

Parameters:
{boolean}bSidebarVisible New value for property sidebarVisible
Returns:
{sap.ui.ux3.CollectionInspector} Reference to this in order to allow method chaining