Class sap.ui.comp.navpopover.NavigationPopoverModule: sap/ui/comp/navpopover/NavigationPopover

extends Popover

The NavigationPopover allows navigating to different destinations by providing links on a popover.
The links are fetched using the CrossApplicationNavigation service of the unified shell.
This class gets instantiated by SmartLink. It is recommended to use SmartLink instead of creating NavigationPopover manually.

Constructor Summary
new sap.ui.comp.navpopover.NavigationPopover(sId?, mSettings?)Constructor for a new navpopover/NavigationPopover.
Event Summary
navigate(oControlEvent)Event is triggered when a link is pressed.
targetsObtained(oControlEvent)The navigation targets that are shown.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.comp.navpopover.NavigationPopover.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.navpopover.NavigationPopover with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.navpopover.NavigationPopover.getMetadata()Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopover.
addAvailableAction(oAvailableAction)Adds some availableAction to the aggregation availableActions.
attachNavigate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navigate event of this sap.ui.comp.navpopover.NavigationPopover.
attachTargetsObtained(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the targetsObtained event of this sap.ui.comp.navpopover.NavigationPopover.
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.
detachNavigate(fnFunction, oListener)Detaches event handler fnFunction from the navigate event of this sap.ui.comp.navpopover.NavigationPopover.
detachTargetsObtained(fnFunction, oListener)Detaches event handler fnFunction from the targetsObtained event of this sap.ui.comp.navpopover.NavigationPopover.
fireNavigate(mArguments?)Fires event navigate to attached listeners.
fireTargetsObtained(mArguments?)Fires event targetsObtained to attached listeners.
getAppStateKey()Gets current value of property appStateKey.
getAvailableActions()Gets content of aggregation availableActions.
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.
getMainNavigationId()Gets current value of property mainNavigationId.
getOwnNavigation()Gets content of aggregation ownNavigation.
getSemanticAttributes()Gets current value of property semanticAttributes.
getSemanticObjectName()Gets current value of property semanticObjectName.
getSource()ID of the element which is the current target of the association source, or null.
getTitle()Gets current value of property title.
indexOfAvailableAction(oAvailableAction)Checks for the provided sap.ui.comp.navpopover.LinkData in the aggregation availableActions.
insertAvailableAction(oAvailableAction, iIndex)Inserts a availableAction into the aggregation availableActions.
removeAllAvailableActions()Removes all the controls from the aggregation availableActions.
removeAvailableAction(vAvailableAction)Removes a availableAction from the aggregation availableActions.
retrieveNavTargets(sSemanticObject)determines the potential navigation targets for the semantical object and visualize the popover
setAppStateKey(sAppStateKey)Sets a new value for property appStateKey.
setComponent(oComponent)Sets the associated component.
setExtraContent(oExtraContent)Sets the associated extraContent.
setMainNavigation(oMainNavigation)Sets the aggregated mainNavigation.
setMainNavigationId(sMainNavigationId)Sets a new value for property mainNavigationId.
setOwnNavigation(oOwnNavigation)Sets the aggregated ownNavigation.
setSemanticAttributes(oSemanticAttributes)Sets a new value for property semanticAttributes.
setSemanticObjectName(sSemanticObjectName)Sets a new value for property semanticObjectName.
setSource(oSource)Sets the associated source.
setTitle(sTitle)Sets a new value for property title.
show()displays the popover.
Constructor Detail
new sap.ui.comp.navpopover.NavigationPopover(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.m.Popover can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? Initial settings for the new control
Event Detail
navigate(oControlEvent)
Event is triggered when a link is pressed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.28.0
targetsObtained(oControlEvent)
The navigation targets that are shown.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.28.0
Method Detail
sap.ui.comp.navpopover.NavigationPopover.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.Popover.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.comp.navpopover.NavigationPopover.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopover.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addAvailableAction(oAvailableAction): sap.ui.comp.navpopover.NavigationPopover
Adds some availableAction to the aggregation availableActions.
Parameters:
{sap.ui.comp.navpopover.LinkData}oAvailableAction the availableAction to add; if empty, nothing is inserted
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
attachNavigate(oData?, fnFunction, oListener?): sap.ui.comp.navpopover.NavigationPopover
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.

Event is triggered when a link is pressed.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.comp.navpopover.NavigationPopover itself
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
attachTargetsObtained(oData?, fnFunction, oListener?): sap.ui.comp.navpopover.NavigationPopover
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.

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.ui.comp.navpopover.NavigationPopover itself
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
destroyAvailableActions(): sap.ui.comp.navpopover.NavigationPopover
Destroys all the availableActions in the aggregation availableActions.
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
Destroys the mainNavigation in the aggregation mainNavigation.
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
Destroys the ownNavigation in the aggregation ownNavigation.
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
detachNavigate(fnFunction, oListener): sap.ui.comp.navpopover.NavigationPopover
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
detachTargetsObtained(fnFunction, oListener): sap.ui.comp.navpopover.NavigationPopover
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
fireNavigate(mArguments?): sap.ui.comp.navpopover.NavigationPopover
Fires event navigate to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
fireTargetsObtained(mArguments?): sap.ui.comp.navpopover.NavigationPopover
Fires event targetsObtained to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
getAppStateKey(): string
Gets current value of property appStateKey.

The application state key passed to retrieve the navigation targets.

Since:
1.28.0
Returns:
{string} Value of property appStateKey
getAvailableActions(): sap.ui.comp.navpopover.LinkData[]
Gets content of aggregation availableActions.

A list of available actions shown to the user.

Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.LinkData[]}
getComponent(): sap.ui.core.Element
ID of the element which is the current target of the association component, or null.
Returns:
{sap.ui.core.Element}
getExtraContent(): sap.ui.core.Control
ID of the element which is the current target of the association extraContent, or null.
Since:
1.28.0
Returns:
{sap.ui.core.Control}
getMainNavigation(): sap.ui.comp.navpopover.LinkData
Gets content of aggregation mainNavigation.

The main navigation displayed first on the popover.

Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.LinkData}
getMainNavigationId(): string
Gets current value of property mainNavigationId.

Sets the visible text for the main navigation. If empty, the navigationPopover will try to get the Id from the given sourceObject.

Returns:
{string} Value of property mainNavigationId
getOwnNavigation(): sap.ui.comp.navpopover.LinkData
Gets content of aggregation ownNavigation.

The navigation taking the user back to the source application.

Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.LinkData}
getSemanticAttributes(): object
Gets current value of property semanticAttributes.

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

Since:
1.28.0
Returns:
{object} Value of property semanticAttributes
getSemanticObjectName(): string
Gets current value of property semanticObjectName.

the name of the semantic object

Since:
1.28.0
Returns:
{string} Value of property semanticObjectName
getSource(): sap.ui.core.Control
ID of the element which is the current target of the association source, or null.
Since:
1.28.0
Returns:
{sap.ui.core.Control}
getTitle(): string
Gets current value of property title.

popover title

Since:
1.28.0
Returns:
{string} Value of property title
indexOfAvailableAction(oAvailableAction): int
Checks for the provided sap.ui.comp.navpopover.LinkData in the aggregation availableActions. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.comp.navpopover.LinkData}oAvailableAction The availableAction whose index is looked for
Since:
1.28.0
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertAvailableAction(oAvailableAction, iIndex): sap.ui.comp.navpopover.NavigationPopover
Inserts a availableAction into the aggregation availableActions.
Parameters:
{sap.ui.comp.navpopover.LinkData}oAvailableAction the availableAction to insert; if empty, nothing is inserted
{int}iIndex 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
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
removeAllAvailableActions(): sap.ui.comp.navpopover.LinkData[]
Removes all the controls from the aggregation availableActions.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.LinkData[]} An array of the removed elements (might be empty)
removeAvailableAction(vAvailableAction): sap.ui.comp.navpopover.LinkData
Removes a availableAction from the aggregation availableActions.
Parameters:
{int|string|sap.ui.comp.navpopover.LinkData}vAvailableAction The availableActionto remove or its index or id
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.LinkData} The removed availableAction or null
retrieveNavTargets(sSemanticObject)
determines the potential navigation targets for the semantical object and visualize the popover
Parameters:
{string}sSemanticObject name of the semantical object
setAppStateKey(sAppStateKey): sap.ui.comp.navpopover.NavigationPopover
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.

Parameters:
{string}sAppStateKey New value for property appStateKey
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setComponent(oComponent): sap.ui.comp.navpopover.NavigationPopover
Sets the associated component.
Parameters:
{sap.ui.core.Element}oComponent Id of an element which becomes the new target of this component association; alternatively, an element instance may be given
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setExtraContent(oExtraContent): sap.ui.comp.navpopover.NavigationPopover
Sets the associated extraContent.
Parameters:
{sap.ui.core.Control}oExtraContent Id of an element which becomes the new target of this extraContent association; alternatively, an element instance may be given
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setMainNavigation(oMainNavigation): sap.ui.comp.navpopover.NavigationPopover
Sets the aggregated mainNavigation.
Parameters:
{sap.ui.comp.navpopover.LinkData}oMainNavigation The mainNavigation to set
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setMainNavigationId(sMainNavigationId): sap.ui.comp.navpopover.NavigationPopover
Sets a new value for property mainNavigationId.

Sets the visible text for the main navigation. If empty, the navigationPopover will try to get the Id from the given sourceObject.

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

Parameters:
{string}sMainNavigationId New value for property mainNavigationId
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setOwnNavigation(oOwnNavigation): sap.ui.comp.navpopover.NavigationPopover
Sets the aggregated ownNavigation.
Parameters:
{sap.ui.comp.navpopover.LinkData}oOwnNavigation The ownNavigation to set
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setSemanticAttributes(oSemanticAttributes): sap.ui.comp.navpopover.NavigationPopover
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.

Parameters:
{object}oSemanticAttributes New value for property semanticAttributes
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
setSemanticObjectName(sSemanticObjectName): sap.ui.comp.navpopover.NavigationPopover
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.

Parameters:
{string}sSemanticObjectName New value for property semanticObjectName
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
Sets the associated source.
Parameters:
{sap.ui.core.Control}oSource Id of an element which becomes the new target of this source association; alternatively, an element instance may be given
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
Sets a new value for property title.

popover title

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

Parameters:
{string}sTitle New value for property title
Since:
1.28.0
Returns:
{sap.ui.comp.navpopover.NavigationPopover} Reference to this in order to allow method chaining
show()
displays the popover. This method should be called, once all navigation targets are adapted by the application