The NavigationListItem control represents an action, which can be selected by the user. It can provide sub items.
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 |
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 |
|
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: |
|
visible | boolean | true | Specifies if the item should be shown. |
Default Aggregation: items
Name | Cardinality | Type | Description |
---|---|---|---|
_expandIconControl | 0..1 | sap.ui.core.Icon | |
items (default) | 0..n | sap.tnt.NavigationListItem |
The sub items. |
Method | Description |
---|---|
addItem |
Adds some item to the aggregation items. |
attachSelect |
Attaches event handler When called, the context of the event handler (its Fired when this item is selected. |
destroyItems |
Destroys all the items in the aggregation items. |
detachSelect |
Detaches event handler 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
|
fireSelect |
Fires event select to attached listeners. |
getExpanded |
Gets current value of property expanded. Specifies if the item is expanded. Default value is |
getHasExpander |
Gets current value of property hasExpander. Specifies if the item has an expander. Default value is |
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 |
getIcon |
Gets current value of property icon. Specifies the icon for the item. Default value is |
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: |
getVisible |
Gets current value of property visible. Specifies if the item should be shown. Default value is |
indexOfItem |
Checks for the provided |
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 Default value is |
setHasExpander |
Sets a new value for property hasExpander. Specifies if the item has an expander. When called with a value of Default value is |
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 When called with a value of |
setIcon |
Sets a new value for property icon. Specifies the icon for the item. When called with a value of Default value is |
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: When called with a value of |
setVisible |
Sets a new value for property visible. Specifies if the item should be shown. When called with a value of Default value is |
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 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 |
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 |
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. |
Gets current value of property expanded.
Specifies if the item is expanded.
Default value is true
.
Gets current value of property hasExpander.
Specifies if the item has an expander.
Default value is true
.
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.
Gets current value of property icon.
Specifies the icon for the item.
Default value is empty string
.
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.
Gets current value of property visible.
Specifies if the item should be shown.
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 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 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 |
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 |
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 |
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 |
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 |
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 |