class sap.tnt.NavigationList

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

The NavigationList control is an interactive control, which provides a choice of different items, ordered as a list.


Constructor

Constructor for a new NavigationList.

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.tnt.NavigationList(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
expanded boolean true

Specifies if the control is in expanded or collapsed mode.

Visibility: public
selectedKey string

Specifies the currently selected key.

Since: 1.62.0.

Visibility: public
width sap.ui.core.CSSSize

Specifies the width of the control.

Visibility: public

Aggregations

Default Aggregation: items

Name Cardinality Type Description
items (default) 0..n sap.tnt.NavigationListItem

The items displayed in the list.


Associations

Name Cardinality Type Description
ariaDescribedBy 0..n sap.ui.core.Control

Association to controls / IDs, which describe this control (see WAI-ARIA attribute aria-describedby).

ariaLabelledBy 0..n sap.ui.core.Control

Association to controls / IDs, which label this control (see WAI-ARIA attribute aria-labelledby).

selectedItem 0..1 sap.tnt.NavigationListItem

The currently selected NavigationListItem.

Since: 1.52.0.


Events Overview

Event Description
itemSelect

Fired when an item is selected.

itemSelect

Fired when an item is selected.

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

The selected item.


Methods Overview

Method Description
addAriaDescribedBy

Adds some ariaDescribedBy into the association ariaDescribedBy.

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

addItem

Adds some item to the aggregation items.

attachItemSelect

Attaches event handler fnFunction to the itemSelect event of this sap.tnt.NavigationList.

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.tnt.NavigationList itself.

Fired when an item is selected.

destroyItems

Destroys all the items in the aggregation items.

detachItemSelect

Detaches event handler fnFunction from the itemSelect event of this sap.tnt.NavigationList.

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

sap.tnt.NavigationList.extend

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

fireItemSelect

Fires event itemSelect to attached listeners.

getAriaDescribedBy

Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getExpanded

Gets current value of property expanded.

Specifies if the control is in expanded or collapsed mode.

Default value is true.

getItems

Gets content of aggregation items.

The items displayed in the list.

sap.tnt.NavigationList.getMetadata

Returns a metadata object for class sap.tnt.NavigationList.

getSelectedItem

Gets the currently selected NavigationListItem.

getSelectedKey

Gets current value of property selectedKey.

Specifies the currently selected key.

getWidth

Gets current value of property width.

Specifies the width of the control.

indexOfItem

Checks for the provided sap.tnt.NavigationListItem in the aggregation items. and returns its index if found or -1 otherwise.

insertItem

Inserts a item into the aggregation items.

removeAllAriaDescribedBy

Removes all the controls in the association named ariaDescribedBy.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeAriaDescribedBy

Removes an ariaDescribedBy from the association named ariaDescribedBy.

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

removeItem

Removes a item from the aggregation items.

setExpanded

Sets a new value for property expanded.

Specifies if the control is in expanded or collapsed mode.

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

Default value is true.

setSelectedItem

Sets the association for selectedItem. Set null to deselect.

setSelectedKey

Sets the selected item based on a key.

setWidth

Sets a new value for property width.

Specifies the width of the control.

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

addAriaDescribedBy

Adds some ariaDescribedBy into the association ariaDescribedBy.

Param Type DefaultValue Description
vAriaDescribedBy sap.ui.core.ID sap.ui.core.Control

The ariaDescribedBy to add; if empty, nothing is inserted

addAriaLabelledBy

Adds some ariaLabelledBy into the association ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to add; if empty, nothing is inserted

addItem

Adds some item to the aggregation items.

Param Type DefaultValue Description
oItem sap.tnt.NavigationListItem

The item to add; if empty, nothing is inserted

attachItemSelect

Attaches event handler fnFunction to the itemSelect event of this sap.tnt.NavigationList.

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.tnt.NavigationList itself.

Fired when an item is selected.

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.tnt.NavigationList itself

destroyItems

Destroys all the items in the aggregation items.

detachItemSelect

Detaches event handler fnFunction from the itemSelect event of this sap.tnt.NavigationList.

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.tnt.NavigationList.extend

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

fireItemSelect

Fires event itemSelect to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.ui.core.Item

The selected item.

getAriaDescribedBy

Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.

getAriaLabelledBy

Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.

getExpanded

Gets current value of property expanded.

Specifies if the control is in expanded or collapsed mode.

Default value is true.

getItems

Gets content of aggregation items.

The items displayed in the list.

sap.tnt.NavigationList.getMetadata

Returns a metadata object for class sap.tnt.NavigationList.

getSelectedItem

Gets the currently selected NavigationListItem.

getSelectedKey

Gets current value of property selectedKey.

Specifies the currently selected key.

getWidth

Gets current value of property width.

Specifies the width of the control.

indexOfItem

Checks for the provided sap.tnt.NavigationListItem in the aggregation items. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oItem sap.tnt.NavigationListItem

The item whose index is looked for

insertItem

Inserts a item into the aggregation items.

Param Type DefaultValue Description
oItem sap.tnt.NavigationListItem

The item to insert; if empty, nothing is inserted

iIndex int

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

removeAllAriaDescribedBy

Removes all the controls in the association named ariaDescribedBy.

removeAllAriaLabelledBy

Removes all the controls in the association named ariaLabelledBy.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeAriaDescribedBy

Removes an ariaDescribedBy from the association named ariaDescribedBy.

Param Type DefaultValue Description
vAriaDescribedBy int sap.ui.core.ID sap.ui.core.Control

The ariaDescribedBy to be removed or its index or ID

removeAriaLabelledBy

Removes an ariaLabelledBy from the association named ariaLabelledBy.

Param Type DefaultValue Description
vAriaLabelledBy int sap.ui.core.ID sap.ui.core.Control

The ariaLabelledBy to be removed or its index or ID

removeItem

Removes a item from the aggregation items.

Param Type DefaultValue Description
vItem int string sap.tnt.NavigationListItem

The item to remove or its index or id

setExpanded

Sets a new value for property expanded.

Specifies if the control is in expanded or collapsed mode.

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

Default value is true.

Param Type DefaultValue Description
bExpanded boolean true

New value for property expanded

setSelectedItem

Sets the association for selectedItem. Set null to deselect.

Param Type DefaultValue Description
selectedItem string sap.tnt.NavigationListItem

The control to be set as selected

setSelectedKey

Sets the selected item based on a key.

Param Type DefaultValue Description
selectedKey string

The key of the item to be selected

setWidth

Sets a new value for property width.

Specifies the width of the control.

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

Param Type DefaultValue Description
sWidth sap.ui.core.CSSSize

New value for property width