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

extends Control

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(mParameters?)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

  • Associations

  • 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:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
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.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
stringoControlEvent.getParameters.idId of selected NavigationItem
sap.ui.ux3.NavigationItemoControlEvent.getParameters.itemThe selected NavigationItem
stringoControlEvent.getParameters.keyKey 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:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated 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.MetadataMetadata object describing this class
addFacet(oFacet): sap.ui.ux3.ThingViewer
Adds some facet to the aggregation facets.
Parameters:
sap.ui.ux3.NavigationItemoFacetthe facet to add; if empty, nothing is inserted
Returns:
sap.ui.ux3.ThingViewerReference 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.ThingGroupoFacetContentthe facetContent to add; if empty, nothing is inserted
Returns:
sap.ui.ux3.ThingViewerReference 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.ThingGroupoHeaderContentthe headerContent to add; if empty, nothing is inserted
Returns:
sap.ui.ux3.ThingViewerReference 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:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.ux3.ThingViewer itself
Returns:
sap.ui.ux3.ThingViewerReference to this in order to allow method chaining
destroyActionBar(): sap.ui.ux3.ThingViewer
Destroys the actionBar in the aggregation actionBar.
Returns:
sap.ui.ux3.ThingViewerReference 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.ThingViewerReference 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.ThingViewerReference 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.ThingViewerReference 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:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.ux3.ThingViewerReference to this in order to allow method chaining
fireFacetSelected(mParameters?): 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.

Parameters:
objectmParameters?Parameters to pass along with the event
stringmParameters.id?Id of selected NavigationItem
sap.ui.ux3.NavigationItemmParameters.item?The selected NavigationItem
stringmParameters.key?Key of selected NavigationItem
Returns:
booleanWhether 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.

Returns:
sap.ui.ux3.ThingViewerHeaderTypeValue of property headerType
Since:
1.16.3
getHeight(): sap.ui.core.CSSSize

Gets current value of property height.

Height of the ThingViewer

Default value is 100%.

Returns:
sap.ui.core.CSSSizeValue of property height
getIcon(): sap.ui.core.URI

Gets current value of property icon.

Thing Icon Url

Returns:
sap.ui.core.URIValue of property icon
getSelectedFacet(): sap.ui.core.ID
ID of the element which is the current target of the association selectedFacet, or null.
Returns:
sap.ui.core.ID
getSubtitle(): string

Gets current value of property subtitle.

Subtitle of the Thing Inspector

Returns:
stringValue of property subtitle
getTitle(): string

Gets current value of property title.

Title of the Thing Inspector

Returns:
stringValue of property title
getType(): string

Gets current value of property type.

Thing type

Returns:
stringValue 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.CSSSizeValue 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.NavigationItemoFacetThe facet whose index is looked for
Returns:
intThe 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.ThingGroupoFacetContentThe facetContent whose index is looked for
Returns:
intThe 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.ThingGroupoHeaderContentThe headerContent whose index is looked for
Returns:
intThe 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.NavigationItemoFacetthe facet to insert; if empty, nothing is inserted
intiIndexthe 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.ThingViewerReference 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.ThingGroupoFacetContentthe facetContent to insert; if empty, nothing is inserted
intiIndexthe 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.ThingViewerReference 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.ThingGroupoHeaderContentthe headerContent to insert; if empty, nothing is inserted
intiIndexthe 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.ThingViewerReference 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.NavigationItemvFacetThe facet to remove or its index or id
Returns:
sap.ui.ux3.NavigationItemThe removed facet or null
removeFacetContent(vFacetContent): sap.ui.ux3.ThingGroup
Removes a facetContent from the aggregation facetContent.
Parameters:
int|string|sap.ui.ux3.ThingGroupvFacetContentThe facetContent to remove or its index or id
Returns:
sap.ui.ux3.ThingGroupThe removed facetContent or null
removeHeaderContent(vHeaderContent): sap.ui.ux3.ThingGroup
Removes a headerContent from the aggregation headerContent.
Parameters:
int|string|sap.ui.ux3.ThingGroupvHeaderContentThe headerContent to remove or its index or id
Returns:
sap.ui.ux3.ThingGroupThe removed headerContent or null
setActionBar(oActionBar): sap.ui.ux3.ThingViewer
Sets the aggregated actionBar.
Parameters:
sap.ui.ux3.ActionBaroActionBarThe actionBar to set
Returns:
sap.ui.ux3.ThingViewerReference 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.ThingViewerHeaderTypesHeaderTypeNew value for property headerType
Returns:
sap.ui.ux3.ThingViewerReference to this in order to allow method chaining
Since:
1.16.3
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.CSSSizesHeightNew value for property height
Returns:
sap.ui.ux3.ThingViewerReference 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.URIsIconNew value for property icon
Returns:
sap.ui.ux3.ThingViewerReference to this in order to allow method chaining
setSelectedFacet(oSelectedFacet): sap.ui.ux3.ThingViewer
Sets the associated selectedFacet.
Parameters:
sap.ui.core.ID|sap.ui.ux3.NavigationItemoSelectedFacetID of an element which becomes the new target of this selectedFacet association; alternatively, an element instance may be given
Returns:
sap.ui.ux3.ThingViewerReference 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:
stringsSubtitleNew value for property subtitle
Returns:
sap.ui.ux3.ThingViewerReference 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:
stringsTitleNew value for property title
Returns:
sap.ui.ux3.ThingViewerReference 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:
stringsTypeNew value for property type
Returns:
sap.ui.ux3.ThingViewerReference 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.CSSSizesWidthNew value for property width
Returns:
sap.ui.ux3.ThingViewerReference to this in order to allow method chaining