class sap.ui.ux3.ThingViewer

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

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.


Constructor

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#constructor for a general description of the syntax of the settings object.

new sap.ui.ux3.ThingViewer(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
headerType sap.ui.ux3.ThingViewerHeaderType Standard

Defines which header type should be used.

Since: 1.16.3.

Visibility: public
height sap.ui.core.CSSSize 100%

Height of the ThingViewer

Visibility: public
icon sap.ui.core.URI

Thing Icon Url

Visibility: public
subtitle string

Subtitle of the Thing Inspector

Visibility: public
title string

Title of the Thing Inspector

Visibility: public
type string

Thing type

Visibility: public
width sap.ui.core.CSSSize 100%

Width of the ThingViewer

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
actionBar 0..1 sap.ui.ux3.ActionBar

An ActionBar can be given

facetContent 0..n sap.ui.ux3.ThingGroup

ThingGroups for content of the selected facet

facets 0..n sap.ui.ux3.NavigationItem

Thing Inspector facets

headerContent 0..n sap.ui.ux3.ThingGroup

ThingGroups for the header content

navBar 0..1 sap.ui.ux3.NavigationBar

NavigationBar that is managed by this ThingViewer


Associations

Name Cardinality Type Description
selectedFacet 0..1 sap.ui.ux3.NavigationItem

The Facet that is currently selected.


Events Overview

Event Description
facetSelected

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.

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

facetSelected

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.

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

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

Id of selected NavigationItem

item sap.ui.ux3.NavigationItem

The selected NavigationItem

key string

Key of selected NavigationItem


Methods Overview

Method Description
addFacet

Adds some facet to the aggregation facets.

addFacetContent

Adds some facetContent to the aggregation facetContent.

addHeaderContent

Adds some headerContent to the aggregation headerContent.

attachFacetSelected

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.

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

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.

sap.ui.ux3.ThingViewer.extend

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.

fireFacetSelected

Fires event facetSelected to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

getActionBar

Gets content of aggregation actionBar.

An ActionBar can be given

getFacetContent

Gets content of aggregation facetContent.

ThingGroups for content of the selected facet

getFacets

Gets content of aggregation facets.

Thing Inspector facets

getHeaderContent

Gets content of aggregation headerContent.

ThingGroups for the header content

getHeaderType

Gets current value of property headerType.

Defines which header type should be used.

Default value is Standard.

getHeight

Gets current value of property height.

Height of the ThingViewer

Default value is '100%'.

getIcon

Gets current value of property icon.

Thing Icon Url

sap.ui.ux3.ThingViewer.getMetadata

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

getSelectedFacet

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

getSubtitle

Gets current value of property subtitle.

Subtitle of the Thing Inspector

getTitle

Gets current value of property title.

Title of the Thing Inspector

getType

Gets current value of property type.

Thing type

getWidth

Gets current value of property width.

Width of the ThingViewer

Default value is '100%'.

indexOfFacet

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

indexOfFacetContent

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

indexOfHeaderContent

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

insertFacet

Inserts a facet into the aggregation facets.

insertFacetContent

Inserts a facetContent into the aggregation facetContent.

insertHeaderContent

Inserts a headerContent into the aggregation headerContent.

removeAllFacetContent

Removes all the controls from the aggregation facetContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllFacets

Removes all the controls from the aggregation facets.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeaderContent

Removes all the controls from the aggregation headerContent.

Additionally, it unregisters them from the hosting UIArea.

removeFacet

Removes a facet from the aggregation facets.

removeFacetContent

Removes a facetContent from the aggregation facetContent.

removeHeaderContent

Removes a headerContent from the aggregation headerContent.

setActionBar

Sets the aggregated actionBar.

setHeaderType

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.

setHeight

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%'.

setIcon

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.

setSelectedFacet

Sets the associated selectedFacet.

setSubtitle

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.

setTitle

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.

setType

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.

setWidth

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%'.

addFacet

Adds some facet to the aggregation facets.

Param Type DefaultValue Description
oFacet sap.ui.ux3.NavigationItem

The facet to add; if empty, nothing is inserted

addFacetContent

Adds some facetContent to the aggregation facetContent.

Param Type DefaultValue Description
oFacetContent sap.ui.ux3.ThingGroup

The facetContent to add; if empty, nothing is inserted

addHeaderContent

Adds some headerContent to the aggregation headerContent.

Param Type DefaultValue Description
oHeaderContent sap.ui.ux3.ThingGroup

The headerContent to add; if empty, nothing is inserted

attachFacetSelected

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.

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

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

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.

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

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.

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

fireFacetSelected

Fires event facetSelected to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

id string

Id of selected NavigationItem

item sap.ui.ux3.NavigationItem

The selected NavigationItem

key string

Key of selected NavigationItem

getActionBar

Gets content of aggregation actionBar.

An ActionBar can be given

getFacetContent

Gets content of aggregation facetContent.

ThingGroups for content of the selected facet

getFacets

Gets content of aggregation facets.

Thing Inspector facets

getHeaderContent

Gets content of aggregation headerContent.

ThingGroups for the header content

getHeaderType

Gets current value of property headerType.

Defines which header type should be used.

Default value is Standard.

getHeight

Gets current value of property height.

Height of the ThingViewer

Default value is '100%'.

getIcon

Gets current value of property icon.

Thing Icon Url

sap.ui.ux3.ThingViewer.getMetadata

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

getSelectedFacet

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

getSubtitle

Gets current value of property subtitle.

Subtitle of the Thing Inspector

getTitle

Gets current value of property title.

Title of the Thing Inspector

getType

Gets current value of property type.

Thing type

getWidth

Gets current value of property width.

Width of the ThingViewer

Default value is '100%'.

indexOfFacet

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

Param Type DefaultValue Description
oFacet sap.ui.ux3.NavigationItem

The facet whose index is looked for

indexOfFacetContent

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

Param Type DefaultValue Description
oFacetContent sap.ui.ux3.ThingGroup

The facetContent whose index is looked for

indexOfHeaderContent

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

Param Type DefaultValue Description
oHeaderContent sap.ui.ux3.ThingGroup

The headerContent whose index is looked for

insertFacet

Inserts a facet into the aggregation facets.

Param Type DefaultValue Description
oFacet sap.ui.ux3.NavigationItem

The facet to insert; if empty, nothing is inserted

iIndex int

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

insertFacetContent

Inserts a facetContent into the aggregation facetContent.

Param Type DefaultValue Description
oFacetContent sap.ui.ux3.ThingGroup

The facetContent to insert; if empty, nothing is inserted

iIndex int

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

insertHeaderContent

Inserts a headerContent into the aggregation headerContent.

Param Type DefaultValue Description
oHeaderContent sap.ui.ux3.ThingGroup

The headerContent to insert; if empty, nothing is inserted

iIndex int

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

removeAllFacetContent

Removes all the controls from the aggregation facetContent.

Additionally, it unregisters them from the hosting UIArea.

removeAllFacets

Removes all the controls from the aggregation facets.

Additionally, it unregisters them from the hosting UIArea.

removeAllHeaderContent

Removes all the controls from the aggregation headerContent.

Additionally, it unregisters them from the hosting UIArea.

removeFacet

Removes a facet from the aggregation facets.

Param Type DefaultValue Description
vFacet int string sap.ui.ux3.NavigationItem

The facet to remove or its index or id

removeFacetContent

Removes a facetContent from the aggregation facetContent.

Param Type DefaultValue Description
vFacetContent int string sap.ui.ux3.ThingGroup

The facetContent to remove or its index or id

removeHeaderContent

Removes a headerContent from the aggregation headerContent.

Param Type DefaultValue Description
vHeaderContent int string sap.ui.ux3.ThingGroup

The headerContent to remove or its index or id

setActionBar

Sets the aggregated actionBar.

Param Type DefaultValue Description
oActionBar sap.ui.ux3.ActionBar

The actionBar to set

setHeaderType

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.

Param Type DefaultValue Description
sHeaderType sap.ui.ux3.ThingViewerHeaderType Standard

New value for property headerType

setHeight

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%'.

Param Type DefaultValue Description
sHeight sap.ui.core.CSSSize '100%'

New value for property height

setIcon

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.

Param Type DefaultValue Description
sIcon sap.ui.core.URI

New value for property icon

setSelectedFacet

Sets the associated selectedFacet.

Param Type DefaultValue Description
oSelectedFacet sap.ui.core.ID sap.ui.ux3.NavigationItem

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

setSubtitle

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.

Param Type DefaultValue Description
sSubtitle string

New value for property subtitle

setTitle

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.

Param Type DefaultValue Description
sTitle string

New value for property title

setType

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.

Param Type DefaultValue Description
sType string

New value for property type

setWidth

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%'.

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize '100%'

New value for property width