class sap.m.TileContainer

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

A container that arranges same-size tiles nicely on carousel pages.


Constructor

Constructor for a new TileContainer.

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.m.TileContainer(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
allowAdd boolean

Determines whether the user is allowed to add Tiles in Edit mode (editable = true).

Visibility: public
editable boolean

Determines whether the TileContainer is editable so you can move, delete or add tiles.

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

Defines the height of the TileContainer in px.

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

Defines the width of the TileContainer in px.

Visibility: public

Aggregations

Default Aggregation: tiles

Name Cardinality Type Description
tiles (default) 0..n sap.m.Tile

The Tiles to be displayed by the TileContainer.


Events Overview

Event Description
tileAdd

Fires when a Tile is added.

tileDelete

Fires if a Tile is deleted in Edit mode.

tileMove

Fires if a Tile is moved.

tileAdd

Fires when a Tile is added.

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

tileDelete

Fires if a Tile is deleted in Edit mode.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
tile sap.m.Tile

The deleted Tile.

tileMove

Fires if a Tile is moved.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
tile sap.m.Tile

The Tile that has been moved.

newIndex int

The new index of the Tile in the tiles aggregation.


Methods Overview

Method Description
addTile

Adds a Tile to the end of the tiles collection.

attachTileAdd

Attaches event handler fnFunction to the tileAdd event of this sap.m.TileContainer.

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

Fires when a Tile is added.

attachTileDelete

Attaches event handler fnFunction to the tileDelete event of this sap.m.TileContainer.

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

Fires if a Tile is deleted in Edit mode.

attachTileMove

Attaches event handler fnFunction to the tileMove event of this sap.m.TileContainer.

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

Fires if a Tile is moved.

deleteTile

Deletes a Tile.

destroyTiles

Destroys all the tiles in the aggregation tiles.

detachTileAdd

Detaches event handler fnFunction from the tileAdd event of this sap.m.TileContainer.

The passed function and listener object must match the ones used for event registration.

detachTileDelete

Detaches event handler fnFunction from the tileDelete event of this sap.m.TileContainer.

The passed function and listener object must match the ones used for event registration.

detachTileMove

Detaches event handler fnFunction from the tileMove event of this sap.m.TileContainer.

The passed function and listener object must match the ones used for event registration.

sap.m.TileContainer.extend

Creates a new subclass of class sap.m.TileContainer 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.

fireTileAdd

Fires event tileAdd to attached listeners.

fireTileDelete

Fires event tileDelete to attached listeners.

fireTileMove

Fires event tileMove to attached listeners.

getAllowAdd

Gets current value of property allowAdd.

Determines whether the user is allowed to add Tiles in Edit mode (editable = true).

getEditable

Gets current value of property editable.

Determines whether the TileContainer is editable so you can move, delete or add tiles.

getHeight

Gets current value of property height.

Defines the height of the TileContainer in px.

Default value is '100%'.

sap.m.TileContainer.getMetadata

Returns a metadata object for class sap.m.TileContainer.

getPageFirstTileIndex

Returns the index of the first Tile visible in the current page.

getTiles

Gets content of aggregation tiles.

The Tiles to be displayed by the TileContainer.

getWidth

Gets current value of property width.

Defines the width of the TileContainer in px.

Default value is '100%'.

indexOfTile

Checks for the provided sap.m.Tile in the aggregation tiles. and returns its index if found or -1 otherwise.

insertTile

Inserts a Tile to the given index.

moveTile

Moves a given Tile to the given index.

removeAllTiles

Removes all the controls from the aggregation tiles.

Additionally, it unregisters them from the hosting UIArea.

removeTile

Removes a tile from the aggregation tiles.

scrollIntoView

Scrolls to the page where the given Tile or tile index is included. Optionally this can be done animated or not. With IE9 the scroll is never animated.

scrollLeft

Scrolls one page to the left.

scrollRight

Scrolls one page to the right.

setAllowAdd

Sets a new value for property allowAdd.

Determines whether the user is allowed to add Tiles in Edit mode (editable = true).

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

setEditable

Sets the editable property to the TileContainer, allowing to move icons. This is currently also set with a long tap.

setHeight

Sets a new value for property height.

Defines the height of the TileContainer in px.

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

Default value is '100%'.

setWidth

Sets a new value for property width.

Defines the width of the TileContainer in px.

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

Default value is '100%'.

addTile

Adds a Tile to the end of the tiles collection.

Param Type DefaultValue Description
oTile sap.m.Tile

The tile to add

attachTileAdd

Attaches event handler fnFunction to the tileAdd event of this sap.m.TileContainer.

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

Fires when a Tile is added.

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

attachTileDelete

Attaches event handler fnFunction to the tileDelete event of this sap.m.TileContainer.

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

Fires if a Tile is deleted in Edit mode.

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

attachTileMove

Attaches event handler fnFunction to the tileMove event of this sap.m.TileContainer.

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

Fires if a Tile is moved.

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

deleteTile

Deletes a Tile.

Param Type DefaultValue Description
oTile sap.m.Tile

The tile to move

destroyTiles

Destroys all the tiles in the aggregation tiles.

detachTileAdd

Detaches event handler fnFunction from the tileAdd event of this sap.m.TileContainer.

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

detachTileDelete

Detaches event handler fnFunction from the tileDelete event of this sap.m.TileContainer.

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

detachTileMove

Detaches event handler fnFunction from the tileMove event of this sap.m.TileContainer.

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.m.TileContainer.extend

Creates a new subclass of class sap.m.TileContainer 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

fireTileAdd

Fires event tileAdd to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireTileDelete

Fires event tileDelete to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

tile sap.m.Tile

The deleted Tile.

fireTileMove

Fires event tileMove to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

tile sap.m.Tile

The Tile that has been moved.

newIndex int

The new index of the Tile in the tiles aggregation.

getAllowAdd

Gets current value of property allowAdd.

Determines whether the user is allowed to add Tiles in Edit mode (editable = true).

getEditable

Gets current value of property editable.

Determines whether the TileContainer is editable so you can move, delete or add tiles.

getHeight

Gets current value of property height.

Defines the height of the TileContainer in px.

Default value is '100%'.

sap.m.TileContainer.getMetadata

Returns a metadata object for class sap.m.TileContainer.

getPageFirstTileIndex

Returns the index of the first Tile visible in the current page.

getTiles

Gets content of aggregation tiles.

The Tiles to be displayed by the TileContainer.

getWidth

Gets current value of property width.

Defines the width of the TileContainer in px.

Default value is '100%'.

indexOfTile

Checks for the provided sap.m.Tile in the aggregation tiles. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oTile sap.m.Tile

The tile whose index is looked for

insertTile

Inserts a Tile to the given index.

Param Type DefaultValue Description
oTile sap.m.Tile

The Tile to insert

iIndex int

The new Tile position in the tiles aggregation

moveTile

Moves a given Tile to the given index.

Param Type DefaultValue Description
vTile sap.m.Tile

The tile to move

iNewIndex int

The new Tile position in the tiles aggregation

removeAllTiles

Removes all the controls from the aggregation tiles.

Additionally, it unregisters them from the hosting UIArea.

removeTile

Removes a tile from the aggregation tiles.

Param Type DefaultValue Description
vTile int string sap.m.Tile

The tile to remove or its index or id

scrollIntoView

Scrolls to the page where the given Tile or tile index is included. Optionally this can be done animated or not. With IE9 the scroll is never animated.

Param Type DefaultValue Description
vTile sap.m.Tile int

The Tile or tile index to be scrolled into view

bAnimated boolean

Whether the scroll should be animated

aVisibleTiles sap.m.Tile[]

optional list of visible tiles in order to avoid filtering them again.

scrollLeft

Scrolls one page to the left.

scrollRight

Scrolls one page to the right.

setAllowAdd

Sets a new value for property allowAdd.

Determines whether the user is allowed to add Tiles in Edit mode (editable = true).

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

Param Type DefaultValue Description
bAllowAdd boolean

New value for property allowAdd

setEditable

Sets the editable property to the TileContainer, allowing to move icons. This is currently also set with a long tap.

Param Type DefaultValue Description
bValue boolean

Whether the container is in edit mode or not

setHeight

Sets a new value for property height.

Defines the height of the TileContainer in px.

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

setWidth

Sets a new value for property width.

Defines the width of the TileContainer in px.

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