class sap.m.TabContainerItem

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

An item to be used in a TabContainer.

This control can be a drag source.

Constructor

Constructor for a new TabContainerItem.

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.TabContainerItem(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
additionalText string empty string

Determines additional text to be displayed for the item.

Visibility: public
icon sap.ui.core.URI

Defines the icon to be displayed as graphical element within the TabContainerItem. It can be an image or an icon from the icon font.

Visibility: public
iconTooltip string

Determines the tooltip text of the TabContainerItem's icon.

Visibility: public
key string

Determines the name of the item. Can be used as input for subsequent actions.

Visibility: public
modified boolean false

Shows if a control is edited (default is false). Items that are marked as modified have a * symbol to indicate that they haven't been saved.

Visibility: public
name string empty string

Determines the text to be displayed for the item.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_image 0..1 sap.ui.core.Control

Icon / Image for the TabContainerItem are managed in this aggregation.

content 0..n sap.ui.core.Control

The content displayed for this item.


Events Overview

Event Description
itemPropertyChanged

Sends information that some of the properties have changed.

itemPropertyChanged

Sends information that some of the properties have changed.

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

The item changed.

propertyKey string

The key of the property.

propertyValue any

The value of the property.


Methods Overview

Method Description
addContent

Adds some content to the aggregation content.

attachItemPropertyChanged

Attaches event handler fnFunction to the itemPropertyChanged event of this sap.m.TabContainerItem.

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

Sends information that some of the properties have changed.

destroyContent

Destroys all the content in the aggregation content.

detachItemPropertyChanged

Detaches event handler fnFunction from the itemPropertyChanged event of this sap.m.TabContainerItem.

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

sap.m.TabContainerItem.extend

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

fireItemPropertyChanged

Fires event itemPropertyChanged to attached listeners.

getAdditionalText

Gets current value of property additionalText.

Determines additional text to be displayed for the item.

Default value is empty string.

getContent

Gets content of aggregation content.

The content displayed for this item.

getIcon

Gets current value of property icon.

Defines the icon to be displayed as graphical element within the TabContainerItem. It can be an image or an icon from the icon font.

getIconTooltip

Gets current value of property iconTooltip.

Determines the tooltip text of the TabContainerItem's icon.

getKey

Gets current value of property key.

Determines the name of the item. Can be used as input for subsequent actions.

sap.m.TabContainerItem.getMetadata

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

getModified

Gets current value of property modified.

Shows if a control is edited (default is false). Items that are marked as modified have a * symbol to indicate that they haven't been saved.

Default value is false.

getName

Gets current value of property name.

Determines the text to be displayed for the item.

Default value is empty string.

indexOfContent

Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.

insertContent

Inserts a content into the aggregation content.

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

setAdditionalText

Sets a new value for property additionalText.

Determines additional text to be displayed for the item.

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

Default value is empty string.

setIcon

Property setter for the icon

setIconTooltip

Sets a new value for property iconTooltip.

Determines the tooltip text of the TabContainerItem's icon.

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

setKey

Sets a new value for property key.

Determines the name of the item. Can be used as input for subsequent actions.

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

setModified

Sets a new value for property modified.

Shows if a control is edited (default is false). Items that are marked as modified have a * symbol to indicate that they haven't been saved.

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

Default value is false.

setName

Sets a new value for property name.

Determines the text to be displayed for the item.

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

Default value is empty string.

setProperty

Overwrites the method in order to suppress invalidation for some properties.

addContent

Adds some content to the aggregation content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content to add; if empty, nothing is inserted

attachItemPropertyChanged

Attaches event handler fnFunction to the itemPropertyChanged event of this sap.m.TabContainerItem.

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

Sends information that some of the properties have changed.

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

destroyContent

Destroys all the content in the aggregation content.

detachItemPropertyChanged

Detaches event handler fnFunction from the itemPropertyChanged event of this sap.m.TabContainerItem.

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

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

fireItemPropertyChanged

Fires event itemPropertyChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

itemChanged sap.m.TabContainerItem

The item changed.

propertyKey string

The key of the property.

propertyValue any

The value of the property.

getAdditionalText

Gets current value of property additionalText.

Determines additional text to be displayed for the item.

Default value is empty string.

getContent

Gets content of aggregation content.

The content displayed for this item.

getIcon

Gets current value of property icon.

Defines the icon to be displayed as graphical element within the TabContainerItem. It can be an image or an icon from the icon font.

getIconTooltip

Gets current value of property iconTooltip.

Determines the tooltip text of the TabContainerItem's icon.

getKey

Gets current value of property key.

Determines the name of the item. Can be used as input for subsequent actions.

sap.m.TabContainerItem.getMetadata

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

getModified

Gets current value of property modified.

Shows if a control is edited (default is false). Items that are marked as modified have a * symbol to indicate that they haven't been saved.

Default value is false.

getName

Gets current value of property name.

Determines the text to be displayed for the item.

Default value is empty string.

indexOfContent

Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content whose index is looked for

insertContent

Inserts a content into the aggregation content.

Param Type DefaultValue Description
oContent sap.ui.core.Control

The content to insert; if empty, nothing is inserted

iIndex int

The 0-based index the content should be inserted at; for a negative value of iIndex, the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position

removeAllContent

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

removeContent

Removes a content from the aggregation content.

Param Type DefaultValue Description
vContent int string sap.ui.core.Control

The content to remove or its index or id

setAdditionalText

Sets a new value for property additionalText.

Determines additional text to be displayed for the item.

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

Default value is empty string.

Param Type DefaultValue Description
sAdditionalText string ""

New value for property additionalText

setIcon

Property setter for the icon

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

new value of the Icon property

setIconTooltip

Sets a new value for property iconTooltip.

Determines the tooltip text of the TabContainerItem's icon.

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

Param Type DefaultValue Description
sIconTooltip string

New value for property iconTooltip

setKey

Sets a new value for property key.

Determines the name of the item. Can be used as input for subsequent actions.

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

Param Type DefaultValue Description
sKey string

New value for property key

setModified

Sets a new value for property modified.

Shows if a control is edited (default is false). Items that are marked as modified have a * symbol to indicate that they haven't been saved.

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

Default value is false.

Param Type DefaultValue Description
bModified boolean false

New value for property modified

setName

Sets a new value for property name.

Determines the text to be displayed for the item.

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

Default value is empty string.

Param Type DefaultValue Description
sName string ""

New value for property name

setProperty

Overwrites the method in order to suppress invalidation for some properties.

Param Type DefaultValue Description
sName string

Property name to be set

vValue boolean string object

Property value to be set

bSuppressInvalidation boolean

Whether invalidation to be suppressed