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. 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
. 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
. detachPress(fnFunction, oListener)Detaches event handler fnFunction
from the press
event of this sap.m.GenericTile
. firePress(mArguments?)Fires event press
to attached listeners. getHeader()Gets current value of property header
. getMode()Gets current value of property mode
. getState()Gets current value of property state
. indexOfTileContent(oTileContent)Checks for the provided sap.m.TileContent
in the aggregation tileContent
. insertTileContent(oTileContent, iIndex)Inserts a tileContent into the aggregation tileContent
. removeTileContent(vTileContent)Removes a tileContent from the aggregation tileContent
. 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
. 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
. 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
. addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
- Properties
- Aggregations
- Events
- press : 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:
{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:
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 |
Returns a metadata object for class sap.m.GenericTile.
Returns:
Adds some tileContent to the aggregation tileContent
.
Parameters:
{sap.m.TileContent} | oTileContent | the tileContent to add; if empty, nothing is inserted |
Returns:
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:
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:
Destroys all the tileContent in the aggregation tileContent
.
Returns:
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:
Fires event press
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Gets current value of property
backgroundImage
.
The URI of the background image.
Returns:
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 |
Gets current value of property
frameType
.
The frame type: 1x1 or 2x1.
Default value is OneByOne
.
Returns:
getHeader(): string
Gets current value of property
header
.
The header of the tile.
Returns:
{string} | Value of property header |
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:
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:
Gets current value of property
state
.
The load status.
Default value is Loaded
.
Returns:
getSubheader(): string
Gets current value of property
subheader
.
The subheader of the tile.
Returns:
{string} | Value of property subheader |
Gets content of aggregation
tileContent
.
The switchable view that depends on the tile type.
Returns:
indexOfTileContent(oTileContent): int
Checks for the provided sap.m.TileContent
in the aggregation tileContent
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
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:
Removes all the controls from the aggregation
tileContent
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes a tileContent from the aggregation tileContent
.
Parameters:
{int|string|sap.m.TileContent} | vTileContent | The tileContentto remove or its index or id |
Returns:
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:
Returns:
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:
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:
Returns:
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:
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:
Returns:
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:
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:
Returns:
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:
Returns:
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:
Unbinds aggregation tileContent
from model data.
Returns:
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:
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:
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:
Sets the aggregated icon
.
Parameters:
- Deprecated:
- Since version 1.36.0. This aggregation is deprecated, use sap.m.TileContent control to display an icon instead.
Returns:
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:
- Deprecated:
- Since version 1.38.0. The GenericTile control has now a fixed size, depending on the used media (desktop, tablet or phone).
Returns: