Class sap.ui.ux3.ThingViewerModule: sap/ui/ux3/ThingViewer

extends Control
known direct subclasses: ThreePanelThingViewer

ThingViewer: Same as ThingInspector but decoupled from the Overlay and the ActionBar. The control can be added to a Parent container that has a defined width. The ThingViewer fill the whole container. If the parent container has no width defined the control will not work properly.

Deprecated API:Since version 1.38.


Since: 1.9.1.
Constructor Summary
new sap.ui.ux3.ThingViewer(sId?, mSettings?)Constructor for a new ThingViewer.
Event Summary
facetSelected(oControlEvent)Event for facet selection.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.ux3.ThingViewer.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.ux3.ThingViewer with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.ux3.ThingViewer.getMetadata()Returns a metadata object for class sap.ui.ux3.ThingViewer.
addFacet(oFacet)Adds some facet to the aggregation facets.
addFacetContent(oFacetContent)Adds some facetContent to the aggregation facetContent.
addHeaderContent(oHeaderContent)Adds some headerContent to the aggregation headerContent.
attachFacetSelected(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the facetSelected event of this sap.ui.ux3.ThingViewer.
destroyActionBar()Destroys the actionBar in the aggregation actionBar.
destroyFacetContent()Destroys all the facetContent in the aggregation facetContent.
destroyFacets()Destroys all the facets in the aggregation facets.
destroyHeaderContent()Destroys all the headerContent in the aggregation headerContent.
detachFacetSelected(fnFunction, oListener)Detaches event handler fnFunction from the facetSelected event of this sap.ui.ux3.ThingViewer.
fireFacetSelected(mArguments?)Fires event facetSelected to attached listeners.
getActionBar()Gets content of aggregation actionBar.
getFacetContent()Gets content of aggregation facetContent.
getFacets()Gets content of aggregation facets.
getHeaderContent()Gets content of aggregation headerContent.
getHeaderType()Gets current value of property headerType.
getHeight()Gets current value of property height.
getIcon()Gets current value of property icon.
getSelectedFacet()ID of the element which is the current target of the association selectedFacet, or null.
getSubtitle()Gets current value of property subtitle.
getTitle()Gets current value of property title.
getType()Gets current value of property type.
getWidth()Gets current value of property width.
indexOfFacet(oFacet)Checks for the provided sap.ui.ux3.NavigationItem in the aggregation facets.
indexOfFacetContent(oFacetContent)Checks for the provided sap.ui.ux3.ThingGroup in the aggregation facetContent.
indexOfHeaderContent(oHeaderContent)Checks for the provided sap.ui.ux3.ThingGroup in the aggregation headerContent.
insertFacet(oFacet, iIndex)Inserts a facet into the aggregation facets.
insertFacetContent(oFacetContent, iIndex)Inserts a facetContent into the aggregation facetContent.
insertHeaderContent(oHeaderContent, iIndex)Inserts a headerContent into the aggregation headerContent.
removeAllFacetContent()Removes all the controls from the aggregation facetContent.
removeAllFacets()Removes all the controls from the aggregation facets.
removeAllHeaderContent()Removes all the controls from the aggregation headerContent.
removeFacet(vFacet)Removes a facet from the aggregation facets.
removeFacetContent(vFacetContent)Removes a facetContent from the aggregation facetContent.
removeHeaderContent(vHeaderContent)Removes a headerContent from the aggregation headerContent.
setActionBar(oActionBar)Sets the aggregated actionBar.
setHeaderType(sHeaderType)Sets a new value for property headerType.
setHeight(sHeight)Sets a new value for property height.
setIcon(sIcon)Sets a new value for property icon.
setSelectedFacet(oSelectedFacet)Sets the associated selectedFacet.
setSubtitle(sSubtitle)Sets a new value for property subtitle.
setTitle(sTitle)Sets a new value for property title.
setType(sType)Sets a new value for property type.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.ui.ux3.ThingViewer(sId?, mSettings?)
Constructor for a new ThingViewer.

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
    • title : string
    • type : string
    • icon : sap.ui.core.URI
    • subtitle : string
    • width : sap.ui.core.CSSSize (default: 100%)
    • height : sap.ui.core.CSSSize (default: 100%)
    • headerType : sap.ui.ux3.ThingViewerHeaderType (default: Standard)
  • Aggregations
  • Events
    • facetSelected : 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
facetSelected(oControlEvent)
Event for facet selection. The application is responsible for displaying the correct content for the selected one. The ThingInspector will currently always mark the first facet as selected.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.id Id of selected NavigationItem
{sap.ui.ux3.NavigationItem}oControlEvent.getParameters.item The selected NavigationItem
{string}oControlEvent.getParameters.key Key of selected NavigationItem
Method Detail
sap.ui.ux3.ThingViewer.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.ThingViewer 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.ThingViewer.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.ux3.ThingViewer.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addFacet(oFacet): sap.ui.ux3.ThingViewer
Adds some facet to the aggregation facets.
Parameters:
{sap.ui.ux3.NavigationItem}oFacet the facet to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
addFacetContent(oFacetContent): sap.ui.ux3.ThingViewer
Adds some facetContent to the aggregation facetContent.
Parameters:
{sap.ui.ux3.ThingGroup}oFacetContent the facetContent to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
addHeaderContent(oHeaderContent): sap.ui.ux3.ThingViewer
Adds some headerContent to the aggregation headerContent.
Parameters:
{sap.ui.ux3.ThingGroup}oHeaderContent the headerContent to add; if empty, nothing is inserted
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
attachFacetSelected(oData?, fnFunction, oListener?): sap.ui.ux3.ThingViewer
Attaches event handler fnFunction to the facetSelected event of this sap.ui.ux3.ThingViewer.

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.ThingViewer itself.

Event for facet selection. The application is responsible for displaying the correct content for the selected one. The ThingInspector will currently always mark the first facet as 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.ThingViewer itself
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
destroyActionBar(): sap.ui.ux3.ThingViewer
Destroys the actionBar in the aggregation actionBar.
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
destroyFacetContent(): sap.ui.ux3.ThingViewer
Destroys all the facetContent in the aggregation facetContent.
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
destroyFacets(): sap.ui.ux3.ThingViewer
Destroys all the facets in the aggregation facets.
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
destroyHeaderContent(): sap.ui.ux3.ThingViewer
Destroys all the headerContent in the aggregation headerContent.
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
detachFacetSelected(fnFunction, oListener): sap.ui.ux3.ThingViewer
Detaches event handler fnFunction from the facetSelected event of this sap.ui.ux3.ThingViewer.

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.ThingViewer} Reference to this in order to allow method chaining
fireFacetSelected(mArguments?): boolean
Fires event facetSelected to attached listeners.

Listeners may prevent the default action of this event by using the preventDefault-method on the event object.

Expects the following event parameters:

  • id of type stringId of selected NavigationItem
  • item of type sap.ui.ux3.NavigationItemThe selected NavigationItem
  • key of type stringKey of selected NavigationItem
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{boolean} Whether or not to prevent the default action
getActionBar(): sap.ui.ux3.ActionBar
Gets content of aggregation actionBar.

An ActionBar can be given

Returns:
{sap.ui.ux3.ActionBar}
getFacetContent(): sap.ui.ux3.ThingGroup[]
Gets content of aggregation facetContent.

ThingGroups for content of the selected facet

Returns:
{sap.ui.ux3.ThingGroup[]}
Gets content of aggregation facets.

Thing Inspector facets

Returns:
{sap.ui.ux3.NavigationItem[]}
getHeaderContent(): sap.ui.ux3.ThingGroup[]
Gets content of aggregation headerContent.

ThingGroups for the header content

Returns:
{sap.ui.ux3.ThingGroup[]}
Gets current value of property headerType.

Defines which header type should be used.

Default value is Standard.

Since:
1.16.3
Returns:
{sap.ui.ux3.ThingViewerHeaderType} Value of property headerType
getHeight(): sap.ui.core.CSSSize
Gets current value of property height.

Height of the ThingViewer

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property height
getIcon(): sap.ui.core.URI
Gets current value of property icon.

Thing Icon Url

Returns:
{sap.ui.core.URI} Value of property icon
getSelectedFacet(): sap.ui.ux3.NavigationItem
ID of the element which is the current target of the association selectedFacet, or null.
Returns:
{sap.ui.ux3.NavigationItem}
getSubtitle(): string
Gets current value of property subtitle.

Subtitle of the Thing Inspector

Returns:
{string} Value of property subtitle
getTitle(): string
Gets current value of property title.

Title of the Thing Inspector

Returns:
{string} Value of property title
getType(): string
Gets current value of property type.

Thing type

Returns:
{string} Value of property type
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

Width of the ThingViewer

Default value is 100%.

Returns:
{sap.ui.core.CSSSize} Value of property width
indexOfFacet(oFacet): int
Checks for the provided sap.ui.ux3.NavigationItem in the aggregation facets. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.ux3.NavigationItem}oFacet The facet whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfFacetContent(oFacetContent): int
Checks for the provided sap.ui.ux3.ThingGroup in the aggregation facetContent. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.ux3.ThingGroup}oFacetContent The facetContent whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
indexOfHeaderContent(oHeaderContent): int
Checks for the provided sap.ui.ux3.ThingGroup in the aggregation headerContent. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.ux3.ThingGroup}oHeaderContent The headerContent whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertFacet(oFacet, iIndex): sap.ui.ux3.ThingViewer
Inserts a facet into the aggregation facets.
Parameters:
{sap.ui.ux3.NavigationItem}oFacet the facet to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the facet should be inserted at; for a negative value of iIndex, the facet is inserted at position 0; for a value greater than the current size of the aggregation, the facet is inserted at the last position
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
insertFacetContent(oFacetContent, iIndex): sap.ui.ux3.ThingViewer
Inserts a facetContent into the aggregation facetContent.
Parameters:
{sap.ui.ux3.ThingGroup}oFacetContent the facetContent to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the facetContent should be inserted at; for a negative value of iIndex, the facetContent is inserted at position 0; for a value greater than the current size of the aggregation, the facetContent is inserted at the last position
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
insertHeaderContent(oHeaderContent, iIndex): sap.ui.ux3.ThingViewer
Inserts a headerContent into the aggregation headerContent.
Parameters:
{sap.ui.ux3.ThingGroup}oHeaderContent the headerContent to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the headerContent should be inserted at; for a negative value of iIndex, the headerContent is inserted at position 0; for a value greater than the current size of the aggregation, the headerContent is inserted at the last position
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
removeAllFacetContent(): sap.ui.ux3.ThingGroup[]
Removes all the controls from the aggregation facetContent.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.ux3.ThingGroup[]} An array of the removed elements (might be empty)
removeAllFacets(): sap.ui.ux3.NavigationItem[]
Removes all the controls from the aggregation facets.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.ux3.NavigationItem[]} An array of the removed elements (might be empty)
removeAllHeaderContent(): sap.ui.ux3.ThingGroup[]
Removes all the controls from the aggregation headerContent.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.ui.ux3.ThingGroup[]} An array of the removed elements (might be empty)
removeFacet(vFacet): sap.ui.ux3.NavigationItem
Removes a facet from the aggregation facets.
Parameters:
{int|string|sap.ui.ux3.NavigationItem}vFacet The facetto remove or its index or id
Returns:
{sap.ui.ux3.NavigationItem} The removed facet or null
removeFacetContent(vFacetContent): sap.ui.ux3.ThingGroup
Removes a facetContent from the aggregation facetContent.
Parameters:
{int|string|sap.ui.ux3.ThingGroup}vFacetContent The facetContentto remove or its index or id
Returns:
{sap.ui.ux3.ThingGroup} The removed facetContent or null
removeHeaderContent(vHeaderContent): sap.ui.ux3.ThingGroup
Removes a headerContent from the aggregation headerContent.
Parameters:
{int|string|sap.ui.ux3.ThingGroup}vHeaderContent The headerContentto remove or its index or id
Returns:
{sap.ui.ux3.ThingGroup} The removed headerContent or null
setActionBar(oActionBar): sap.ui.ux3.ThingViewer
Sets the aggregated actionBar.
Parameters:
{sap.ui.ux3.ActionBar}oActionBar The actionBar to set
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setHeaderType(sHeaderType): sap.ui.ux3.ThingViewer
Sets a new value for property headerType.

Defines which header type should be used.

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

Default value is Standard.

Parameters:
{sap.ui.ux3.ThingViewerHeaderType}sHeaderType New value for property headerType
Since:
1.16.3
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setHeight(sHeight): sap.ui.ux3.ThingViewer
Sets a new value for property height.

Height of the ThingViewer

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

Default value is 100%.

Parameters:
{sap.ui.core.CSSSize}sHeight New value for property height
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setIcon(sIcon): sap.ui.ux3.ThingViewer
Sets a new value for property icon.

Thing Icon Url

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

Parameters:
{sap.ui.core.URI}sIcon New value for property icon
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setSelectedFacet(oSelectedFacet): sap.ui.ux3.ThingViewer
Sets the associated selectedFacet.
Parameters:
{sap.ui.ux3.NavigationItem}oSelectedFacet Id of an element which becomes the new target of this selectedFacet association; alternatively, an element instance may be given
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setSubtitle(sSubtitle): sap.ui.ux3.ThingViewer
Sets a new value for property subtitle.

Subtitle of the Thing Inspector

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

Parameters:
{string}sSubtitle New value for property subtitle
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setTitle(sTitle): sap.ui.ux3.ThingViewer
Sets a new value for property title.

Title of the Thing Inspector

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

Parameters:
{string}sTitle New value for property title
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setType(sType): sap.ui.ux3.ThingViewer
Sets a new value for property type.

Thing type

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

Parameters:
{string}sType New value for property type
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining
setWidth(sWidth): sap.ui.ux3.ThingViewer
Sets a new value for property width.

Width of the ThingViewer

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

Default value is 100%.

Parameters:
{sap.ui.core.CSSSize}sWidth New value for property width
Returns:
{sap.ui.ux3.ThingViewer} Reference to this in order to allow method chaining