class sap.tnt.NavigationListItem

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

The NavigationListItem control represents an action, which can be selected by the user. It can provide sub items.


Constructor

Constructor for a new NavigationListItem.

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.NavigationListItem(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 item is expanded.

Visibility: public
hasExpander boolean true

Specifies if the item has an expander.

Visibility: public
href sap.ui.core.URI

Defines the link target URI. Supports standard hyperlink behavior. If a JavaScript action should be triggered, this should not be set, but instead an event handler for the select event should be registered.

Visibility: public
icon sap.ui.core.URI empty string

Specifies the icon for the item.

Visibility: public
target string

Specifies the browsing context where the linked content will open.

Options are the standard values for window.open() supported by browsers: _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered. This property is only used when the href property is set.

Visibility: public
visible boolean true

Specifies if the item should be shown.

Since: 1.52.

Visibility: public

Aggregations

Default Aggregation: items

Name Cardinality Type Description
_expandIconControl 0..1 sap.ui.core.Icon
items (default) 0..n sap.tnt.NavigationListItem

The sub items.


Events Overview

Event Description
select

Fired when this item is selected.

select

Fired when this 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
addItem

Adds some item to the aggregation items.

attachSelect

Attaches event handler fnFunction to the select event of this sap.tnt.NavigationListItem.

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

Fired when this item is selected.

destroyItems

Destroys all the items in the aggregation items.

detachSelect

Detaches event handler fnFunction from the select event of this sap.tnt.NavigationListItem.

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

sap.tnt.NavigationListItem.extend

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

fireSelect

Fires event select to attached listeners.

getExpanded

Gets current value of property expanded.

Specifies if the item is expanded.

Default value is true.

getHasExpander

Gets current value of property hasExpander.

Specifies if the item has an expander.

Default value is true.

getHref

Gets current value of property href.

Defines the link target URI. Supports standard hyperlink behavior. If a JavaScript action should be triggered, this should not be set, but instead an event handler for the select event should be registered.

getIcon

Gets current value of property icon.

Specifies the icon for the item.

Default value is empty string.

getItems

Gets content of aggregation items.

The sub items.

sap.tnt.NavigationListItem.getMetadata

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

getTarget

Gets current value of property target.

Specifies the browsing context where the linked content will open.

Options are the standard values for window.open() supported by browsers: _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered. This property is only used when the href property is set.

getVisible

Gets current value of property visible.

Specifies if the item should be shown.

Default value is true.

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.

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

removeItem

Removes a item from the aggregation items.

setExpanded

Sets a new value for property expanded.

Specifies if the item is expanded.

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

Default value is true.

setHasExpander

Sets a new value for property hasExpander.

Specifies if the item has an expander.

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

Default value is true.

setHref

Sets a new value for property href.

Defines the link target URI. Supports standard hyperlink behavior. If a JavaScript action should be triggered, this should not be set, but instead an event handler for the select event should be registered.

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

setIcon

Sets a new value for property icon.

Specifies the icon 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.

setTarget

Sets a new value for property target.

Specifies the browsing context where the linked content will open.

Options are the standard values for window.open() supported by browsers: _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered. This property is only used when the href property is set.

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

setVisible

Sets a new value for property visible.

Specifies if the item should be shown.

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

Default value is true.

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

attachSelect

Attaches event handler fnFunction to the select event of this sap.tnt.NavigationListItem.

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

Fired when this 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.NavigationListItem itself

destroyItems

Destroys all the items in the aggregation items.

detachSelect

Detaches event handler fnFunction from the select event of this sap.tnt.NavigationListItem.

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

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

fireSelect

Fires event select to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

item sap.ui.core.Item

The selected item.

getExpanded

Gets current value of property expanded.

Specifies if the item is expanded.

Default value is true.

getHasExpander

Gets current value of property hasExpander.

Specifies if the item has an expander.

Default value is true.

getHref

Gets current value of property href.

Defines the link target URI. Supports standard hyperlink behavior. If a JavaScript action should be triggered, this should not be set, but instead an event handler for the select event should be registered.

getIcon

Gets current value of property icon.

Specifies the icon for the item.

Default value is empty string.

getItems

Gets content of aggregation items.

The sub items.

sap.tnt.NavigationListItem.getMetadata

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

getTarget

Gets current value of property target.

Specifies the browsing context where the linked content will open.

Options are the standard values for window.open() supported by browsers: _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered. This property is only used when the href property is set.

getVisible

Gets current value of property visible.

Specifies if the item should be shown.

Default value is true.

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

removeAllItems

Removes all the controls from the aggregation items.

Additionally, it unregisters them from the hosting UIArea.

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 item is expanded.

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

setHasExpander

Sets a new value for property hasExpander.

Specifies if the item has an expander.

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
bHasExpander boolean true

New value for property hasExpander

setHref

Sets a new value for property href.

Defines the link target URI. Supports standard hyperlink behavior. If a JavaScript action should be triggered, this should not be set, but instead an event handler for the select event should be registered.

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

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

New value for property href

setIcon

Sets a new value for property icon.

Specifies the icon 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
sIcon sap.ui.core.URI ''

New value for property icon

setTarget

Sets a new value for property target.

Specifies the browsing context where the linked content will open.

Options are the standard values for window.open() supported by browsers: _self, _top, _blank, _parent, _search. Alternatively, a frame name can be entered. This property is only used when the href property is set.

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

Param Type DefaultValue Description
sTarget string

New value for property target

setVisible

Sets a new value for property visible.

Specifies if the item should be shown.

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
bVisible boolean true

New value for property visible