Class sap.m.GenericTileModule: sap/m/GenericTile

extends Control

Displays the title, description, and a customizable main area.


Since: 1.34.
Constructor Summary
new sap.m.GenericTile(sId?, mSettings?)Constructor for a new sap.m.GenericTile control.
Event Summary
press(oControlEvent)The event is fired when the user chooses the tile.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.GenericTile.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.GenericTile with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.GenericTile.getMetadata()Returns a metadata object for class sap.m.GenericTile.
addTileContent(oTileContent)Adds some tileContent to the aggregation tileContent.
attachPress(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the press event of this sap.m.GenericTile.
bindTileContent(oBindingInfo)Binds aggregation tileContent to model data.
destroyTileContent()Destroys all the tileContent in the aggregation tileContent.
detachPress(fnFunction, oListener)Detaches event handler fnFunction from the press event of this sap.m.GenericTile.
firePress(mArguments?)Fires event press to attached listeners.
getBackgroundImage()Gets current value of property backgroundImage.
getFailedText()Gets current value of property failedText.
getFrameType()Gets current value of property frameType.
getHeader()Gets current value of property header.
getHeaderImage()Gets current value of property headerImage.
getImageDescription()Gets current value of property imageDescription.
getMode()Gets current value of property mode.
getState()Gets current value of property state.
getSubheader()Gets current value of property subheader.
getTileContent()Gets content of aggregation tileContent.
indexOfTileContent(oTileContent)Checks for the provided sap.m.TileContent in the aggregation tileContent.
insertTileContent(oTileContent, iIndex)Inserts a tileContent into the aggregation tileContent.
removeAllTileContent()Removes all the controls from the aggregation tileContent.
removeTileContent(vTileContent)Removes a tileContent from the aggregation tileContent.
setBackgroundImage(sBackgroundImage)Sets a new value for property backgroundImage.
setFailedText(sFailedText)Sets a new value for property failedText.
setFrameType(sFrameType)Sets a new value for property frameType.
setHeader(sHeader)Sets a new value for property header.
setHeaderImage(sHeaderImage)Sets a new value for property headerImage.
setImageDescription(sImageDescription)Sets a new value for property imageDescription.
setMode(sMode)Sets a new value for property mode.
setState(sState)Sets a new value for property state.
setSubheader(sSubheader)Sets a new value for property subheader.
unbindTileContent()Unbinds aggregation tileContent from model data.
destroyIcon()Destroys the icon in the aggregation icon.
getIcon()Gets content of aggregation icon.
getSize()Gets current value of property size.
setIcon(oIcon)Sets the aggregated icon.
setSize(sSize)Sets a new value for property size.
Constructor Detail
new sap.m.GenericTile(sId?, mSettings?)
Constructor for a new sap.m.GenericTile control.

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:

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
Event Detail
press(oControlEvent)
The event is fired when the user chooses the tile.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.m.GenericTile.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.GenericTile 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.m.GenericTile.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.GenericTile.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addTileContent(oTileContent): sap.m.GenericTile
Adds some tileContent to the aggregation tileContent.
Parameters:
{sap.m.TileContent}oTileContent the tileContent to add; if empty, nothing is inserted
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
attachPress(oData?, fnFunction, oListener?): sap.m.GenericTile
Attaches event handler fnFunction to the press event of this sap.m.GenericTile.

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.m.GenericTile itself.

The event is fired when the user chooses the tile.

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.m.GenericTile itself
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
bindTileContent(oBindingInfo): sap.m.GenericTile
Binds aggregation tileContent to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
destroyTileContent(): sap.m.GenericTile
Destroys all the tileContent in the aggregation tileContent.
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
detachPress(fnFunction, oListener): sap.m.GenericTile
Detaches event handler fnFunction from the press event of this sap.m.GenericTile.

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.m.GenericTile} Reference to this in order to allow method chaining
firePress(mArguments?): sap.m.GenericTile
Fires event press to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
getBackgroundImage(): sap.ui.core.URI
Gets current value of property backgroundImage.

The URI of the background image.

Returns:
{sap.ui.core.URI} Value of property backgroundImage
getFailedText(): string
Gets current value of property failedText.

The message that appears when the control is in the Failed state.

Returns:
{string} Value of property failedText
getFrameType(): sap.m.FrameType
Gets current value of property frameType.

The frame type: 1x1 or 2x1.

Default value is OneByOne.

Returns:
{sap.m.FrameType} Value of property frameType
getHeader(): string
Gets current value of property header.

The header of the tile.

Returns:
{string} Value of property header
getHeaderImage(): sap.ui.core.URI
Gets current value of property headerImage.

The image to be displayed as a graphical element within the header. This can be an image or an icon from the icon font.

Returns:
{sap.ui.core.URI} Value of property headerImage
getImageDescription(): string
Gets current value of property imageDescription.

Description of a header image that is used in the tooltip.

Returns:
{string} Value of property imageDescription
Gets current value of property mode.

The mode of the GenericTile.

Default value is ContentMode.

Returns:
{sap.m.GenericTileMode} Value of property mode
getState(): sap.m.LoadState
Gets current value of property state.

The load status.

Default value is Loaded.

Returns:
{sap.m.LoadState} Value of property state
getSubheader(): string
Gets current value of property subheader.

The subheader of the tile.

Returns:
{string} Value of property subheader
getTileContent(): sap.m.TileContent[]
Gets content of aggregation tileContent.

The switchable view that depends on the tile type.

Returns:
{sap.m.TileContent[]}
indexOfTileContent(oTileContent): int
Checks for the provided sap.m.TileContent in the aggregation tileContent. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.TileContent}oTileContent The tileContent whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertTileContent(oTileContent, iIndex): sap.m.GenericTile
Inserts a tileContent into the aggregation tileContent.
Parameters:
{sap.m.TileContent}oTileContent the tileContent to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the tileContent should be inserted at; for a negative value of iIndex, the tileContent is inserted at position 0; for a value greater than the current size of the aggregation, the tileContent is inserted at the last position
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
removeAllTileContent(): sap.m.TileContent[]
Removes all the controls from the aggregation tileContent.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.TileContent[]} An array of the removed elements (might be empty)
removeTileContent(vTileContent): sap.m.TileContent
Removes a tileContent from the aggregation tileContent.
Parameters:
{int|string|sap.m.TileContent}vTileContent The tileContentto remove or its index or id
Returns:
{sap.m.TileContent} The removed tileContent or null
setBackgroundImage(sBackgroundImage): sap.m.GenericTile
Sets a new value for property backgroundImage.

The URI of the background image.

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

Parameters:
{sap.ui.core.URI}sBackgroundImage New value for property backgroundImage
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setFailedText(sFailedText): sap.m.GenericTile
Sets a new value for property failedText.

The message that appears when the control is in the Failed state.

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

Parameters:
{string}sFailedText New value for property failedText
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setFrameType(sFrameType): sap.m.GenericTile
Sets a new value for property frameType.

The frame type: 1x1 or 2x1.

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

Default value is OneByOne.

Parameters:
{sap.m.FrameType}sFrameType New value for property frameType
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setHeader(sHeader): sap.m.GenericTile
Sets a new value for property header.

The header of the tile.

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

Parameters:
{string}sHeader New value for property header
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setHeaderImage(sHeaderImage): sap.m.GenericTile
Sets a new value for property headerImage.

The image to be displayed as a graphical element within the header. This can be an image or an icon from the icon font.

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

Parameters:
{sap.ui.core.URI}sHeaderImage New value for property headerImage
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setImageDescription(sImageDescription): sap.m.GenericTile
Sets a new value for property imageDescription.

Description of a header image that is used in the tooltip.

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

Parameters:
{string}sImageDescription New value for property imageDescription
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setMode(sMode): sap.m.GenericTile
Sets a new value for property mode.

The mode of the GenericTile.

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

Default value is ContentMode.

Parameters:
{sap.m.GenericTileMode}sMode New value for property mode
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setState(sState): sap.m.GenericTile
Sets a new value for property state.

The load status.

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

Default value is Loaded.

Parameters:
{sap.m.LoadState}sState New value for property state
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setSubheader(sSubheader): sap.m.GenericTile
Sets a new value for property subheader.

The subheader of the tile.

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

Parameters:
{string}sSubheader New value for property subheader
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
unbindTileContent(): sap.m.GenericTile
Unbinds aggregation tileContent from model data.
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
destroyIcon(): sap.m.GenericTile
Destroys the icon in the aggregation icon.
Deprecated:
Since version 1.36.0. This aggregation is deprecated, use sap.m.TileContent control to display an icon instead.
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
Gets content of aggregation icon.

An icon or image to be displayed in the control. This aggregation is deprecated since version 1.36.0, to display an icon or image use sap.m.TileContent control instead.

Deprecated:
Since version 1.36.0. This aggregation is deprecated, use sap.m.TileContent control to display an icon instead.
Returns:
{sap.ui.core.Control}
getSize(): sap.m.Size
Gets current value of property size.

The size of the tile. If not set, then the default size is applied based on the device.

Default value is Auto.

Deprecated:
Since version 1.38.0. The GenericTile control has now a fixed size, depending on the used media (desktop, tablet or phone).
Returns:
{sap.m.Size} Value of property size
setIcon(oIcon): sap.m.GenericTile
Sets the aggregated icon.
Parameters:
{sap.ui.core.Control}oIcon The icon to set
Deprecated:
Since version 1.36.0. This aggregation is deprecated, use sap.m.TileContent control to display an icon instead.
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining
setSize(sSize): sap.m.GenericTile
Sets a new value for property size.

The size of the tile. If not set, then the default size is applied based on the device.

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

Default value is Auto.

Parameters:
{sap.m.Size}sSize New value for property size
Deprecated:
Since version 1.38.0. The GenericTile control has now a fixed size, depending on the used media (desktop, tablet or phone).
Returns:
{sap.m.GenericTile} Reference to this in order to allow method chaining