class sap.tnt.SideNavigation

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

The SideNavigation control is a container, which consists of flexible and fixed parts on top of each other.

Responsive Behavior

Note: In order for the SideNavigation to stretch properly, its parent layout control should only be the sap.tnt.ToolPage.


Constructor

Constructor for a new SideNavigation.

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.SideNavigation(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
ariaLabel string

Specifies an optional aria-label that can be used by the screen readers.

Since: 1.96.2.

Visibility: public
expanded boolean true

Specifies if the control is expanded.

Visibility: public
selectedKey string

Specifies the currently selected key.

Since: 1.62.0.

Visibility: public

Aggregations

Default Aggregation: item

Name Cardinality Type Description
_bottomArrowControl 0..1 sap.ui.core.Icon

The bottom arrow, used for scrolling throw items when SideNavigation is collapsed.

_topArrowControl 0..1 sap.ui.core.Icon

The top arrow, used for scrolling throw items when SideNavigation is collapsed.

fixedItem 0..1 sap.tnt.NavigationList

Defines the content inside the fixed part.

footer 0..1 sap.tnt.NavigationList

Defines the content inside the footer.

item (default) 0..1 sap.tnt.NavigationList

Defines the content inside the flexible part.


Associations

Name Cardinality Type Description
selectedItem 0..1 sap.tnt.NavigationListItem

The 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
attachItemSelect

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

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

Fired when an item is selected.

bindItem

Binds aggregation item to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

destroyFixedItem

Destroys the fixedItem in the aggregation fixedItem.

destroyFooter

Destroys the footer in the aggregation footer.

destroyItem

Destroys the item in the aggregation item.

detachItemSelect

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

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

sap.tnt.SideNavigation.extend

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

getAriaLabel

Gets current value of property ariaLabel.

Specifies an optional aria-label that can be used by the screen readers.

getExpanded

Gets current value of property expanded.

Specifies if the control is expanded.

Default value is true.

getFixedItem

Gets content of aggregation fixedItem.

Defines the content inside the fixed part.

getFooter

Gets content of aggregation footer.

Defines the content inside the footer.

getItem

Gets content of aggregation item.

Defines the content inside the flexible part.

sap.tnt.SideNavigation.getMetadata

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

getSelectedItem

ID of the element which is the current target of the association selectedItem, or null.

getSelectedKey

Gets current value of property selectedKey.

Specifies the currently selected key.

setAriaLabel

Sets a new value for property ariaLabel.

Specifies an optional aria-label that can be used by the screen readers.

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

setExpanded

Sets if the control is in expanded or collapsed mode.

setFixedItem

Sets the aggregated fixedItem.

setFooter

Sets the aggregated footer.

setItem

Sets the aggregated item.

setSelectedItem

Sets the association for selectedItem

setSelectedKey

Sets the selected item based on a key.

unbindItem

Unbinds aggregation item from model data.

attachItemSelect

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

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

bindItem

Binds aggregation item to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

destroyFixedItem

Destroys the fixedItem in the aggregation fixedItem.

destroyFooter

Destroys the footer in the aggregation footer.

destroyItem

Destroys the item in the aggregation item.

detachItemSelect

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

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

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

getAriaLabel

Gets current value of property ariaLabel.

Specifies an optional aria-label that can be used by the screen readers.

getExpanded

Gets current value of property expanded.

Specifies if the control is expanded.

Default value is true.

getFixedItem

Gets content of aggregation fixedItem.

Defines the content inside the fixed part.

getFooter

Gets content of aggregation footer.

Defines the content inside the footer.

getItem

Gets content of aggregation item.

Defines the content inside the flexible part.

sap.tnt.SideNavigation.getMetadata

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

getSelectedItem

ID of the element which is the current target of the association selectedItem, or null.

getSelectedKey

Gets current value of property selectedKey.

Specifies the currently selected key.

setAriaLabel

Sets a new value for property ariaLabel.

Specifies an optional aria-label that can be used by the screen readers.

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

Param Type DefaultValue Description
sAriaLabel string

New value for property ariaLabel

setExpanded

Sets if the control is in expanded or collapsed mode.

Param Type DefaultValue Description
isExpanded boolean

Indication if the SideNavigation is expanded.

setFixedItem

Sets the aggregated fixedItem.

Param Type DefaultValue Description
oFixedItem sap.tnt.NavigationList

The fixedItem to set

setFooter

Sets the aggregated footer.

Param Type DefaultValue Description
oFooter sap.tnt.NavigationList

The footer to set

setItem

Sets the aggregated item.

Param Type DefaultValue Description
oItem sap.tnt.NavigationList

The item to set

setSelectedItem

Sets the association for selectedItem

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

unbindItem

Unbinds aggregation item from model data.