The NavigationPopoverHandler control uses a semantic object to display NavigationPopover for further navigation steps.
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
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
. getControl()ID of the element which is the current target of the association control
, or null
. getSemanticObjectValue()Gets the current value assigned to the field with the NavigationPopoverHandler's semantic object name. setFieldName(sFieldName)Sets a new value for property fieldName
. addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
clone,
destroy,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getMetadata,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
invalidate,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
toString,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
- Properties
- Events
- beforePopoverOpens : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- navigationTargetsObtained : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- innerNavigate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
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} | 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 |
Returns a metadata object for class sap.ui.comp.navpopover.NavigationPopoverHandler.
Returns:
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:
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:
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:
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:
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:
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:
Fires event
beforePopoverOpens
to attached listeners.
Expects the following event parameters:
semanticObject
of type string
The semantic object for which the navigation targets will be retrieved.semanticAttributes
of type object
Map containing the semantic attributes calculated from the binding that will be used to retrieve the navigation targets.setSemanticAttributes
of type function
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.
setAppStateKey
of type function
This callback function sets an application state key that is used over the cross-application navigation. Signatures: setAppStateKey(sAppStateKey)
Parameter: originalId
of type string
The ID of the NavigationPopoverHandler.open
of type function
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.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.36.0
Returns:
Fires event
innerNavigate
to attached listeners.
Expects the following event parameters:
text
of type string
The UI text shown in the clicked link.href
of type string
The navigation target of the clicked link.semanticObject
of type string
The semantic object used to retrieve this target.semanticAttributes
of type object
Map containing the semantic attributes used to retrieve this target.originalId
of type string
The ID of the NavigationPopoverHandler.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.36.0
Returns:
Fires event
navigationTargetsObtained
to attached listeners.
Expects the following event parameters:
mainNavigation
of type sap.ui.comp.navpopover.LinkData
The main navigation object.actions
of type sap.ui.comp.navpopover.LinkData[]
Array of available navigation target objects.ownNavigation
of type sap.ui.comp.navpopover.LinkData
The navigation object for the own application. This navigation option is by default not visible on the popover.semanticObject
of type string
The semantic object for which the navigation targets have been retrieved.originalId
of type string
The ID of the NavigationPopoverHandler.show
of type function
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.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.36.0
Returns:
ID of the element which is the current target of the association control
, or null
.
Returns:
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:
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:
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:
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:
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:
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: