The NavigationList control is an interactive control, which provides a choice of different items, ordered as a list.
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 |
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. |
|
width | sap.ui.core.CSSSize | Specifies the width of the control. Visibility: public |
Default Aggregation: items
Name | Cardinality | Type | Description |
---|---|---|---|
items (default) | 0..n | sap.tnt.NavigationListItem |
The items displayed in the list. |
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 |
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 When called, the context of the event handler (its Fired when an item is selected. |
destroyItems |
Destroys all the items in the aggregation items. |
detachItemSelect |
Detaches event handler 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
|
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 |
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 |
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 |
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 Default value is |
setSelectedItem |
Sets the association for selectedItem. Set |
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 |
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 |
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 |
Adds some item to the aggregation items.
Param | Type | DefaultValue | Description |
---|---|---|---|
oItem | sap.tnt.NavigationListItem |
The item to add; if empty, nothing is inserted |
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 |
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 |
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. |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property expanded.
Specifies if the control is in expanded or collapsed mode.
Default value is true
.
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 |
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 |
Removes all the controls from the aggregation items.
Additionally, it unregisters them from the hosting UIArea.
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 |
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 |
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 |
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 |
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 |
Sets the selected item based on a key.
Param | Type | DefaultValue | Description |
---|---|---|---|
selectedKey | string |
The key of the item to be selected |
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 |