class sap.ui.comp.navpopover.NavigationPopover

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/comp/navpopover/NavigationPopover
Application Component: CA-UI5-CMP

The NavigationPopover control is used to present information in a specific format. Note: This control is used by the NavigationPopoverHandler and must not be used manually.


Constructor

Constructor for a new navpopover/NavigationPopover.

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.ui.comp.navpopover.NavigationPopover(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
appStateKey string

The application state key passed to retrieve the navigation targets.

Since: 1.28.0.

Visibility: public
availableActionsPersonalizationText string undefined

Determines the text of personalization link. If this property is set to some string, choosing the personalization link will trigger the availableActionsPersonalizationPress event. If this property is not set, the personalization link is not shown.

Since: 1.44.0.

Visibility: public
mainNavigationId string

Sets the description of the main navigation link. If mainNavigation also contains an href description, then mainNavigationId is displayed. If mainNavigationId is set to an empty string '', neither description nor subtitle are displayed.

Since: 1.28.0.

Visibility: public
semanticAttributes object

Describes the semantic attributes. The attribute has to be a map.

Since: 1.28.0.

Visibility: public
semanticObjectName string

The name of the semantic object.

Since: 1.28.0.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
availableActions 0..n sap.ui.comp.navpopover.LinkData

A list of available actions shown as links.

Since: 1.28.0.

mainNavigation 0..1 sap.ui.comp.navpopover.LinkData

The main navigation link. If mainNavigationId is not set then text of mainNavigation is displayed. Otherwise the mainNavigationId is displayed.

Since: 1.28.0.

ownNavigation 0..1 sap.ui.comp.navpopover.LinkData

The navigation taking the user back to the source application.
Deprecated as of version 1.40.0. The property ownNavigation is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.


Associations

Name Cardinality Type Description
component 0..1 sap.ui.core.Element

The parent component.

extraContent 0..1 sap.ui.core.Control

In addition to main navigation link and available links some additional content can be displayed in the popover.

Since: 1.28.0.

source 0..1 sap.ui.core.Control

Source control for which the popover is displayed.

Since: 1.28.0.


Events Overview

Event Description
availableActionsPersonalizationPress

This event is fired when personalization of availableActions is chosen.

Since: 1.44.0.

navigate

This event is fired when a link is chosen.

Since: 1.28.0.

targetsObtained

The navigation targets that are shown.

Since: 1.28.0.

availableActionsPersonalizationPress

This event is fired when personalization of availableActions is chosen.

Since: 1.44.0.

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

navigate

This event is fired when a link is chosen.

Since: 1.28.0.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
text string

The UI text shown in the chosen link

href string

The navigation target of the chosen link

targetsObtained

The navigation targets that are shown.

Since: 1.28.0.

The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addAvailableAction

Adds some availableAction to the aggregation availableActions.

attachAvailableActionsPersonalizationPress

Attaches event handler fnFunction to the availableActionsPersonalizationPress event of this sap.ui.comp.navpopover.NavigationPopover.

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.ui.comp.navpopover.NavigationPopover itself.

This event is fired when personalization of availableActions is chosen.

attachNavigate

Attaches event handler fnFunction to the navigate event of this sap.ui.comp.navpopover.NavigationPopover.

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.ui.comp.navpopover.NavigationPopover itself.

This event is fired when a link is chosen.

attachTargetsObtained

Attaches event handler fnFunction to the targetsObtained event of this sap.ui.comp.navpopover.NavigationPopover.

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.ui.comp.navpopover.NavigationPopover itself.

The navigation targets that are shown.

Since 1.40.0 The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
destroyAvailableActions

Destroys all the availableActions in the aggregation availableActions.

destroyMainNavigation

Destroys the mainNavigation in the aggregation mainNavigation.

destroyOwnNavigation

Destroys the ownNavigation in the aggregation ownNavigation.

Since 1.40.0 The property <code>ownNavigation</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
detachAvailableActionsPersonalizationPress

Detaches event handler fnFunction from the availableActionsPersonalizationPress event of this sap.ui.comp.navpopover.NavigationPopover.

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

detachNavigate

Detaches event handler fnFunction from the navigate event of this sap.ui.comp.navpopover.NavigationPopover.

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

detachTargetsObtained

Detaches event handler fnFunction from the targetsObtained event of this sap.ui.comp.navpopover.NavigationPopover.

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

Since 1.40.0 The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
sap.ui.comp.navpopover.NavigationPopover.extend

Creates a new subclass of class sap.ui.comp.navpopover.NavigationPopover with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.ResponsivePopover.extend.

fireAvailableActionsPersonalizationPress

Fires event availableActionsPersonalizationPress to attached listeners.

fireNavigate

Fires event navigate to attached listeners.

fireTargetsObtained

Fires event targetsObtained to attached listeners.

Since 1.40.0 The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
getAppStateKey

Gets current value of property appStateKey.

The application state key passed to retrieve the navigation targets.

Since 1.40.0 The property <code>appStateKey</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
getAvailableActions

Gets content of aggregation availableActions.

A list of available actions shown as links.

getAvailableActionsPersonalizationText

Gets current value of property availableActionsPersonalizationText.

Determines the text of personalization link. If this property is set to some string, choosing the personalization link will trigger the availableActionsPersonalizationPress event. If this property is not set, the personalization link is not shown.

Default value is undefined.

getComponent

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

getDirectLink

Returns link for direct navigation if the NavigationPopover has only mainNavigation or one availableAction and no extraContent.

getExtraContent

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

getMainNavigation

Gets content of aggregation mainNavigation.

The main navigation link. If mainNavigationId is not set then text of mainNavigation is displayed. Otherwise the mainNavigationId is displayed.

getMainNavigationId

Gets current value of property mainNavigationId.

Sets the description of the main navigation link. If mainNavigation also contains an href description, then mainNavigationId is displayed. If mainNavigationId is set to an empty string '', neither description nor subtitle are displayed.

sap.ui.comp.navpopover.NavigationPopover.getMetadata

Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopover.

getOwnNavigation

Gets content of aggregation ownNavigation.

The navigation taking the user back to the source application.

Since 1.40.0 The property <code>ownNavigation</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
getSemanticAttributes

Gets current value of property semanticAttributes.

Describes the semantic attributes. The attribute has to be a map.

Since 1.40.0 The property <code>semanticAttributes</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
getSemanticObjectName

Gets current value of property semanticObjectName.

The name of the semantic object.

Since 1.40.0 The property <code>semanticObjectName</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
getSource

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

indexOfAvailableAction

Checks for the provided sap.ui.comp.navpopover.LinkData in the aggregation availableActions. and returns its index if found or -1 otherwise.

insertAvailableAction

Inserts a availableAction into the aggregation availableActions.

removeAllAvailableActions

Removes all the controls from the aggregation availableActions.

Additionally, it unregisters them from the hosting UIArea.

removeAvailableAction

Removes a availableAction from the aggregation availableActions.

retrieveNavTargets

Determines the potential navigation targets for the semantical object and visualize the popover.

Since 1.42.0 Target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
setAppStateKey

Sets a new value for property appStateKey.

The application state key passed to retrieve the navigation targets.

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

Since 1.40.0 The property <code>appStateKey</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
setAvailableActionsPersonalizationText

Sets a new value for property availableActionsPersonalizationText.

Determines the text of personalization link. If this property is set to some string, choosing the personalization link will trigger the availableActionsPersonalizationPress event. If this property is not set, the personalization link is not shown.

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

Default value is undefined.

setComponent

Sets the associated component.

setExtraContent

Sets the associated extraContent.

setMainNavigation

Sets the aggregated mainNavigation.

setMainNavigationId

Sets a new value for property mainNavigationId.

Sets the description of the main navigation link. If mainNavigation also contains an href description, then mainNavigationId is displayed. If mainNavigationId is set to an empty string '', neither description nor subtitle are displayed.

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

setOwnNavigation

Sets the aggregated ownNavigation.

Since 1.40.0 The property <code>ownNavigation</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
setSemanticAttributes

Sets a new value for property semanticAttributes.

Describes the semantic attributes. The attribute has to be a map.

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

Since 1.40.0 The property <code>semanticAttributes</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
setSemanticObjectName

Sets a new value for property semanticObjectName.

The name of the semantic object.

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

Since 1.40.0 The property <code>semanticObjectName</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
setSource

Sets the associated source.

show

Displays the popover. This method should be called, once all navigation targets are adapted by the application.

addAvailableAction

Adds some availableAction to the aggregation availableActions.

Param Type DefaultValue Description
oAvailableAction sap.ui.comp.navpopover.LinkData

The availableAction to add; if empty, nothing is inserted

attachAvailableActionsPersonalizationPress

Attaches event handler fnFunction to the availableActionsPersonalizationPress event of this sap.ui.comp.navpopover.NavigationPopover.

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.ui.comp.navpopover.NavigationPopover itself.

This event is fired when personalization of availableActions is chosen.

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.ui.comp.navpopover.NavigationPopover itself

attachNavigate

Attaches event handler fnFunction to the navigate event of this sap.ui.comp.navpopover.NavigationPopover.

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.ui.comp.navpopover.NavigationPopover itself.

This event is fired when a link is chosen.

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.ui.comp.navpopover.NavigationPopover itself

attachTargetsObtained

Attaches event handler fnFunction to the targetsObtained event of this sap.ui.comp.navpopover.NavigationPopover.

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.ui.comp.navpopover.NavigationPopover itself.

The navigation targets that are shown.

Since 1.40.0 The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
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.ui.comp.navpopover.NavigationPopover itself

destroyAvailableActions

Destroys all the availableActions in the aggregation availableActions.

destroyMainNavigation

Destroys the mainNavigation in the aggregation mainNavigation.

destroyOwnNavigation

Destroys the ownNavigation in the aggregation ownNavigation.

Since 1.40.0 The property <code>ownNavigation</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.

detachAvailableActionsPersonalizationPress

Detaches event handler fnFunction from the availableActionsPersonalizationPress event of this sap.ui.comp.navpopover.NavigationPopover.

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

detachNavigate

Detaches event handler fnFunction from the navigate event of this sap.ui.comp.navpopover.NavigationPopover.

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

detachTargetsObtained

Detaches event handler fnFunction from the targetsObtained event of this sap.ui.comp.navpopover.NavigationPopover.

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

Since 1.40.0 The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
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.ui.comp.navpopover.NavigationPopover.extend

Creates a new subclass of class sap.ui.comp.navpopover.NavigationPopover with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.ResponsivePopover.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

fireAvailableActionsPersonalizationPress

Fires event availableActionsPersonalizationPress to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireNavigate

Fires event navigate to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

text string

The UI text shown in the chosen link

href string

The navigation target of the chosen link

fireTargetsObtained

Fires event targetsObtained to attached listeners.

Since 1.40.0 The event <code>navigationTargetsObtained</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination. The event <code>navigationTargetsObtained</code> is fired from NavigationPopoverHandler after navigation targets are determined.
Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getAppStateKey

Gets current value of property appStateKey.

The application state key passed to retrieve the navigation targets.

Since 1.40.0 The property <code>appStateKey</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.

getAvailableActions

Gets content of aggregation availableActions.

A list of available actions shown as links.

getAvailableActionsPersonalizationText

Gets current value of property availableActionsPersonalizationText.

Determines the text of personalization link. If this property is set to some string, choosing the personalization link will trigger the availableActionsPersonalizationPress event. If this property is not set, the personalization link is not shown.

Default value is undefined.

getComponent

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

getExtraContent

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

getMainNavigation

Gets content of aggregation mainNavigation.

The main navigation link. If mainNavigationId is not set then text of mainNavigation is displayed. Otherwise the mainNavigationId is displayed.

getMainNavigationId

Gets current value of property mainNavigationId.

Sets the description of the main navigation link. If mainNavigation also contains an href description, then mainNavigationId is displayed. If mainNavigationId is set to an empty string '', neither description nor subtitle are displayed.

sap.ui.comp.navpopover.NavigationPopover.getMetadata

Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopover.

getOwnNavigation

Gets content of aggregation ownNavigation.

The navigation taking the user back to the source application.

Since 1.40.0 The property <code>ownNavigation</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.

getSemanticAttributes

Gets current value of property semanticAttributes.

Describes the semantic attributes. The attribute has to be a map.

Since 1.40.0 The property <code>semanticAttributes</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.

getSemanticObjectName

Gets current value of property semanticObjectName.

The name of the semantic object.

Since 1.40.0 The property <code>semanticObjectName</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.

getSource

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

indexOfAvailableAction

Checks for the provided sap.ui.comp.navpopover.LinkData in the aggregation availableActions. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oAvailableAction sap.ui.comp.navpopover.LinkData

The availableAction whose index is looked for

insertAvailableAction

Inserts a availableAction into the aggregation availableActions.

Param Type DefaultValue Description
oAvailableAction sap.ui.comp.navpopover.LinkData

The availableAction to insert; if empty, nothing is inserted

iIndex int

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

removeAllAvailableActions

Removes all the controls from the aggregation availableActions.

Additionally, it unregisters them from the hosting UIArea.

removeAvailableAction

Removes a availableAction from the aggregation availableActions.

Param Type DefaultValue Description
vAvailableAction int string sap.ui.comp.navpopover.LinkData

The availableAction to remove or its index or id

retrieveNavTargets

Determines the potential navigation targets for the semantical object and visualize the popover.

Since 1.42.0 Target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.

setAppStateKey

Sets a new value for property appStateKey.

The application state key passed to retrieve the navigation targets.

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

Since 1.40.0 The property <code>appStateKey</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
Param Type DefaultValue Description
sAppStateKey string

New value for property appStateKey

setAvailableActionsPersonalizationText

Sets a new value for property availableActionsPersonalizationText.

Determines the text of personalization link. If this property is set to some string, choosing the personalization link will trigger the availableActionsPersonalizationPress event. If this property is not set, the personalization link is not shown.

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

Default value is undefined.

Param Type DefaultValue Description
sAvailableActionsPersonalizationText string

New value for property availableActionsPersonalizationText

setComponent

Sets the associated component.

Param Type DefaultValue Description
oComponent sap.ui.core.ID sap.ui.core.Element

ID of an element which becomes the new target of this component association; alternatively, an element instance may be given

setExtraContent

Sets the associated extraContent.

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

ID of an element which becomes the new target of this extraContent association; alternatively, an element instance may be given

setMainNavigation

Sets the aggregated mainNavigation.

Param Type DefaultValue Description
oMainNavigation sap.ui.comp.navpopover.LinkData

The mainNavigation to set

setMainNavigationId

Sets a new value for property mainNavigationId.

Sets the description of the main navigation link. If mainNavigation also contains an href description, then mainNavigationId is displayed. If mainNavigationId is set to an empty string '', neither description nor subtitle are displayed.

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

Param Type DefaultValue Description
sMainNavigationId string

New value for property mainNavigationId

setOwnNavigation

Sets the aggregated ownNavigation.

Since 1.40.0 The property <code>ownNavigation</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
Param Type DefaultValue Description
oOwnNavigation sap.ui.comp.navpopover.LinkData

The ownNavigation to set

setSemanticAttributes

Sets a new value for property semanticAttributes.

Describes the semantic attributes. The attribute has to be a map.

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

Since 1.40.0 The property <code>semanticAttributes</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
Param Type DefaultValue Description
oSemanticAttributes object

New value for property semanticAttributes

setSemanticObjectName

Sets a new value for property semanticObjectName.

The name of the semantic object.

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

Since 1.40.0 The property <code>semanticObjectName</code> is obsolete as target determination is no longer done by NavigationPopover. Instead the NavigationPopoverHandler is responsible for target determination.
Param Type DefaultValue Description
sSemanticObjectName string

New value for property semanticObjectName

setSource

Sets the associated source.

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

ID of an element which becomes the new target of this source association; alternatively, an element instance may be given

show

Displays the popover. This method should be called, once all navigation targets are adapted by the application.