Class sap.ui.comp.navpopover.NavigationPopoverHandlerModule: sap/ui/comp/navpopover/NavigationPopoverHandler


The NavigationPopoverHandler control uses a semantic object to display NavigationPopover for further navigation steps.

Constructor Summary
new sap.ui.comp.navpopover.NavigationPopoverHandler(sId?, mSettings?)Constructor for a new navpopover/NavigationPopoverHandler.
Event Summary
beforePopoverOpens(oControlEvent)Event is fired before the navigation popover opens and before navigation target links are getting retrieved.
innerNavigate(oControlEvent)This event is fired after a navigation link on the navigation popover has been clicked.
navigationTargetsObtained(oControlEvent)After the navigation targets are retrieved, navigationTargetsObtained is fired and provides the possibility to change the targets.
Method Summary
sap.ui.comp.navpopover.NavigationPopoverHandler.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.navpopover.NavigationPopoverHandler with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.navpopover.NavigationPopoverHandler.getMetadata()Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopoverHandler.
attachBeforePopoverOpens(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforePopoverOpens event of this sap.ui.comp.navpopover.NavigationPopoverHandler.
attachInnerNavigate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the innerNavigate event of this sap.ui.comp.navpopover.NavigationPopoverHandler.
attachNavigationTargetsObtained(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navigationTargetsObtained event of this sap.ui.comp.navpopover.NavigationPopoverHandler.
detachBeforePopoverOpens(fnFunction, oListener)Detaches event handler fnFunction from the beforePopoverOpens event of this sap.ui.comp.navpopover.NavigationPopoverHandler.
detachInnerNavigate(fnFunction, oListener)Detaches event handler fnFunction from the innerNavigate event of this sap.ui.comp.navpopover.NavigationPopoverHandler.
detachNavigationTargetsObtained(fnFunction, oListener)Detaches event handler fnFunction from the navigationTargetsObtained event of this sap.ui.comp.navpopover.NavigationPopoverHandler.
fireBeforePopoverOpens(mArguments?)Fires event beforePopoverOpens to attached listeners.
fireInnerNavigate(mArguments?)Fires event innerNavigate to attached listeners.
fireNavigationTargetsObtained(mArguments?)Fires event navigationTargetsObtained to attached listeners.
getControl()ID of the element which is the current target of the association control, or null.
getFieldName()Gets current value of property fieldName.
getMapFieldToSemanticObject()Gets current value of property mapFieldToSemanticObject.
getSemanticObject()Gets current value of property semanticObject.
getSemanticObjectController()Gets current value of property semanticObjectController.
getSemanticObjectLabel()Gets current value of property semanticObjectLabel.
getSemanticObjectValue()Gets the current value assigned to the field with the NavigationPopoverHandler's semantic object name.
openPopover()Opens the navigation popover.
setControl(oControl)Sets the associated control.
setFieldName(sFieldName)Sets a new value for property fieldName.
setMapFieldToSemanticObject(bMapFieldToSemanticObject)Sets a new value for property mapFieldToSemanticObject.
setSemanticObject(sSemanticObject)Sets a new value for property semanticObject.
setSemanticObjectController(oSemanticObjectController)Sets a new value for property semanticObjectController.
setSemanticObjectLabel(sSemanticObjectLabel)Sets a new value for property semanticObjectLabel.
Methods borrowed from class sap.ui.base.Object
Constructor Detail
new sap.ui.comp.navpopover.NavigationPopoverHandler(sId?, mSettings?)
Constructor for a new navpopover/NavigationPopoverHandler.

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.ui.base.ManagedObject 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
beforePopoverOpens(oControlEvent)
Event is fired before the navigation popover opens and before navigation target links are getting retrieved. Event can be used to change the parameters used to retrieve the navigation targets. In case of NavigationPopoverHandler, the beforePopoverOpens is fired after the link has been clicked.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.semanticObject The semantic object for which the navigation targets will be retrieved.
{object}oControlEvent.getParameters.semanticAttributes Map containing the semantic attributes calculated from the binding that will be used to retrieve the navigation targets.
{function}oControlEvent.getParameters.setSemanticAttributes This callback function enables you to define a changed semantic attributes map. Signatures: setSemanticAttributes(oSemanticAttributesMap) Parameter:
  • {object} oSemanticAttributesMap New map containing the semantic attributes to be used.
{function}oControlEvent.getParameters.setAppStateKey This callback function sets an application state key that is used over the cross-application navigation. Signatures: setAppStateKey(sAppStateKey) Parameter:
  • {string} sAppStateKey
{string}oControlEvent.getParameters.originalId The ID of the NavigationPopoverHandler.
{function}oControlEvent.getParameters.open This callback function triggers the retrieval of navigation targets and leads to the opening of the navigation popover. Signatures: open() If the beforePopoverOpens has been registered, the open function has to be called manually in order to open the navigation popover.
Since:
1.36.0
innerNavigate(oControlEvent)
This event is fired after a navigation link on the navigation popover has been clicked. This event is only fired, if the user left-clicks the link. Right-clicking the link and selecting 'Open in New Window' etc. in the context menu does not fire the event.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{string}oControlEvent.getParameters.text The UI text shown in the clicked link.
{string}oControlEvent.getParameters.href The navigation target of the clicked link.
{string}oControlEvent.getParameters.semanticObject The semantic object used to retrieve this target.
{object}oControlEvent.getParameters.semanticAttributes Map containing the semantic attributes used to retrieve this target.
{string}oControlEvent.getParameters.originalId The ID of the NavigationPopoverHandler.
Since:
1.36.0
navigationTargetsObtained(oControlEvent)
After the navigation targets are retrieved, navigationTargetsObtained is fired and provides the possibility to change the targets.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.comp.navpopover.LinkData}oControlEvent.getParameters.mainNavigation The main navigation object.
{sap.ui.comp.navpopover.LinkData[]}oControlEvent.getParameters.actions Array of available navigation target objects.
{sap.ui.comp.navpopover.LinkData}oControlEvent.getParameters.ownNavigation The navigation object for the own application. This navigation option is by default not visible on the popover.
{string}oControlEvent.getParameters.semanticObject The semantic object for which the navigation targets have been retrieved.
{string}oControlEvent.getParameters.originalId The ID of the NavigationPopoverHandler.
{function}oControlEvent.getParameters.show This callback function shows the actual navigation popover. If the navigationTargetsObtained has been registered, the show function has to be called manually in order to open the navigation popover. Signatures: show()show(oMainNavigation, aAvailableActions, oExtraContent)show(sMainNavigationId, oMainNavigation, aAvailableActions, oExtraContent) Parameters:
  • {string} sMainNavigationId The visible text for the main navigation section. If empty, the main navigation ID is calculated using binding context of given source object (for example NavigationPopoverHandler).
  • {sap.ui.comp.navpopover.LinkData} oMainNavigation The main navigation object. If empty, property mainNavigation will be used.
  • {sap.ui.comp.navpopover.LinkData[]} aAvailableActions Array containing the cross application navigation links. If empty, property actions will be used.
  • {sap.ui.core.Control} oExtraContent Control that will be displayed in extra content section on the popover.
Since:
1.36.0
Method Detail
sap.ui.comp.navpopover.NavigationPopoverHandler.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.comp.navpopover.NavigationPopoverHandler 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.base.ManagedObject.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.NavigationPopoverHandler.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopoverHandler.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachBeforePopoverOpens(oData?, fnFunction, oListener?): sap.ui.comp.navpopover.NavigationPopoverHandler
Attaches event handler fnFunction to the beforePopoverOpens event of this sap.ui.comp.navpopover.NavigationPopoverHandler.

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

Event is fired before the navigation popover opens and before navigation target links are getting retrieved. Event can be used to change the parameters used to retrieve the navigation targets. In case of NavigationPopoverHandler, the beforePopoverOpens is fired after the link has been clicked.

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.NavigationPopoverHandler itself
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
attachInnerNavigate(oData?, fnFunction, oListener?): sap.ui.comp.navpopover.NavigationPopoverHandler
Attaches event handler fnFunction to the innerNavigate event of this sap.ui.comp.navpopover.NavigationPopoverHandler.

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

This event is fired after a navigation link on the navigation popover has been clicked. This event is only fired, if the user left-clicks the link. Right-clicking the link and selecting 'Open in New Window' etc. in the context menu does not fire the event.

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.NavigationPopoverHandler itself
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
attachNavigationTargetsObtained(oData?, fnFunction, oListener?): sap.ui.comp.navpopover.NavigationPopoverHandler
Attaches event handler fnFunction to the navigationTargetsObtained event of this sap.ui.comp.navpopover.NavigationPopoverHandler.

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

After the navigation targets are retrieved, navigationTargetsObtained is fired and provides the possibility to change the targets.

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.NavigationPopoverHandler itself
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
detachBeforePopoverOpens(fnFunction, oListener): sap.ui.comp.navpopover.NavigationPopoverHandler
Detaches event handler fnFunction from the beforePopoverOpens event of this sap.ui.comp.navpopover.NavigationPopoverHandler.

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.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
detachInnerNavigate(fnFunction, oListener): sap.ui.comp.navpopover.NavigationPopoverHandler
Detaches event handler fnFunction from the innerNavigate event of this sap.ui.comp.navpopover.NavigationPopoverHandler.

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.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
detachNavigationTargetsObtained(fnFunction, oListener): sap.ui.comp.navpopover.NavigationPopoverHandler
Detaches event handler fnFunction from the navigationTargetsObtained event of this sap.ui.comp.navpopover.NavigationPopoverHandler.

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.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
fireBeforePopoverOpens(mArguments?): sap.ui.comp.navpopover.NavigationPopoverHandler
Fires event beforePopoverOpens to attached listeners.

Expects the following event parameters:

  • semanticObject of type stringThe semantic object for which the navigation targets will be retrieved.
  • semanticAttributes of type objectMap containing the semantic attributes calculated from the binding that will be used to retrieve the navigation targets.
  • setSemanticAttributes of type functionThis callback function enables you to define a changed semantic attributes map. Signatures: setSemanticAttributes(oSemanticAttributesMap) Parameter:
    • {object} oSemanticAttributesMap New map containing the semantic attributes to be used.
  • setAppStateKey of type functionThis callback function sets an application state key that is used over the cross-application navigation. Signatures: setAppStateKey(sAppStateKey) Parameter:
    • {string} sAppStateKey
  • originalId of type stringThe ID of the NavigationPopoverHandler.
  • open of type functionThis callback function triggers the retrieval of navigation targets and leads to the opening of the navigation popover. Signatures: open() If the beforePopoverOpens has been registered, the open function has to be called manually in order to open the navigation popover.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
fireInnerNavigate(mArguments?): sap.ui.comp.navpopover.NavigationPopoverHandler
Fires event innerNavigate to attached listeners.

Expects the following event parameters:

  • text of type stringThe UI text shown in the clicked link.
  • href of type stringThe navigation target of the clicked link.
  • semanticObject of type stringThe semantic object used to retrieve this target.
  • semanticAttributes of type objectMap containing the semantic attributes used to retrieve this target.
  • originalId of type stringThe ID of the NavigationPopoverHandler.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
fireNavigationTargetsObtained(mArguments?): sap.ui.comp.navpopover.NavigationPopoverHandler
Fires event navigationTargetsObtained to attached listeners.

Expects the following event parameters:

  • mainNavigation of type sap.ui.comp.navpopover.LinkDataThe main navigation object.
  • actions of type sap.ui.comp.navpopover.LinkData[]Array of available navigation target objects.
  • ownNavigation of type sap.ui.comp.navpopover.LinkDataThe navigation object for the own application. This navigation option is by default not visible on the popover.
  • semanticObject of type stringThe semantic object for which the navigation targets have been retrieved.
  • originalId of type stringThe ID of the NavigationPopoverHandler.
  • show of type functionThis callback function shows the actual navigation popover. If the navigationTargetsObtained has been registered, the show function has to be called manually in order to open the navigation popover. Signatures: show()show(oMainNavigation, aAvailableActions, oExtraContent)show(sMainNavigationId, oMainNavigation, aAvailableActions, oExtraContent) Parameters:
    • {string} sMainNavigationId The visible text for the main navigation section. If empty, the main navigation ID is calculated using binding context of given source object (for example NavigationPopoverHandler).
    • {sap.ui.comp.navpopover.LinkData} oMainNavigation The main navigation object. If empty, property mainNavigation will be used.
    • {sap.ui.comp.navpopover.LinkData[]} aAvailableActions Array containing the cross application navigation links. If empty, property actions will be used.
    • {sap.ui.core.Control} oExtraContent Control that will be displayed in extra content section on the popover.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
getControl(): sap.ui.core.Control
ID of the element which is the current target of the association control, or null.
Returns:
{sap.ui.core.Control}
getFieldName(): string
Gets current value of property fieldName.

The metadata field name for this NavigationPopoverHandler control.

Since:
1.36.0
Returns:
{string} Value of property fieldName
getMapFieldToSemanticObject(): boolean
Gets current value of property mapFieldToSemanticObject.

If set to false, the NavigationPopoverHandler control will not replace its field name with the according semanticObject property during the calculation of the semantic attributes. This enables the usage of several NavigationPopoverHandler on the same semantic object.

Default value is true.

Returns:
{boolean} Value of property mapFieldToSemanticObject
getSemanticObject(): string
Gets current value of property semanticObject.

Name of semantic object which is used to fill the navigation popover.

Since:
1.36.0
Returns:
{string} Value of property semanticObject
getSemanticObjectController(): any
Gets current value of property semanticObjectController.

The semantic object controller controls events for several NavigationPopoverHandler controls. If the controller is not set manually, it tries to find a SemanticObjectController in its parent hierarchy.

Since:
1.36.0
Returns:
{any} Value of property semanticObjectController
getSemanticObjectLabel(): string
Gets current value of property semanticObjectLabel.

Shown label of semantic object.

Since:
1.36.0
Returns:
{string} Value of property semanticObjectLabel
getSemanticObjectValue(): object
Gets the current value assigned to the field with the NavigationPopoverHandler's semantic object name.
Returns:
{object} The semantic object's value.
openPopover()
Opens the navigation popover.
Sets the associated control.
Parameters:
{sap.ui.core.Control}oControl Id of an element which becomes the new target of this control association; alternatively, an element instance may be given
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
Sets a new value for property fieldName.

The metadata field name for this NavigationPopoverHandler control.

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

Parameters:
{string}sFieldName New value for property fieldName
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
setMapFieldToSemanticObject(bMapFieldToSemanticObject): sap.ui.comp.navpopover.NavigationPopoverHandler
Sets a new value for property mapFieldToSemanticObject.

If set to false, the NavigationPopoverHandler control will not replace its field name with the according semanticObject property during the calculation of the semantic attributes. This enables the usage of several NavigationPopoverHandler on the same semantic object.

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

Default value is true.

Parameters:
{boolean}bMapFieldToSemanticObject New value for property mapFieldToSemanticObject
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
setSemanticObject(sSemanticObject): sap.ui.comp.navpopover.NavigationPopoverHandler
Sets a new value for property semanticObject.

Name of semantic object which is used to fill the navigation popover.

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

Parameters:
{string}sSemanticObject New value for property semanticObject
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
setSemanticObjectController(oSemanticObjectController): sap.ui.comp.navpopover.NavigationPopoverHandler
Sets a new value for property semanticObjectController.

The semantic object controller controls events for several NavigationPopoverHandler controls. If the controller is not set manually, it tries to find a SemanticObjectController in its parent hierarchy.

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

Parameters:
{any}oSemanticObjectController New value for property semanticObjectController
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining
setSemanticObjectLabel(sSemanticObjectLabel): sap.ui.comp.navpopover.NavigationPopoverHandler
Sets a new value for property semanticObjectLabel.

Shown label of semantic object.

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

Parameters:
{string}sSemanticObjectLabel New value for property semanticObjectLabel
Since:
1.36.0
Returns:
{sap.ui.comp.navpopover.NavigationPopoverHandler} Reference to this in order to allow method chaining