A container that arranges same-size tiles nicely on carousel pages.
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 |
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 |
Default Aggregation: tiles
Name | Cardinality | Type | Description |
---|---|---|---|
tiles (default) | 0..n | sap.m.Tile |
The Tiles to be displayed by the TileContainer. |
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. |
Fires when a Tile is added.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object |
Method | Description |
---|---|
addTile |
Adds a Tile to the end of the tiles collection. |
attachTileAdd |
Attaches event handler When called, the context of the event handler (its Fires when a Tile is added. |
attachTileDelete |
Attaches event handler When called, the context of the event handler (its Fires if a Tile is deleted in Edit mode. |
attachTileMove |
Attaches event handler When called, the context of the event handler (its Fires if a Tile is moved. |
deleteTile |
Deletes a Tile. |
destroyTiles |
Destroys all the tiles in the aggregation tiles. |
detachTileAdd |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachTileDelete |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachTileMove |
Detaches event handler 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
|
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 |
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 |
indexOfTile |
Checks for the provided |
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 |
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 Default value is |
setWidth |
Sets a new value for property width. Defines the width of the TileContainer in px. When called with a value of Default value is |
Adds a Tile to the end of the tiles collection.
Param | Type | DefaultValue | Description |
---|---|---|---|
oTile | sap.m.Tile |
The tile to add |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Fires event tileAdd to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
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. |
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. |
Gets current value of property allowAdd.
Determines whether the user is allowed to add Tiles in Edit mode (editable = true).
Gets current value of property editable.
Determines whether the TileContainer is editable so you can move, delete or add tiles.
Gets current value of property height.
Defines the height of the TileContainer in px.
Default value is '100%'
.
Gets current value of property width.
Defines the width of the TileContainer in px.
Default value is '100%'
.
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 |
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 |
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 |
Removes all the controls from the aggregation tiles.
Additionally, it unregisters them from the hosting UIArea.
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 |
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. |
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 |
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 |
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 |
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 |