The SemanticObjectController allows the user to register against semantic object navigation events as well as define semantic objects which should be ignored.
Event Summary
beforePopoverOpens(oControlEvent)Event is fired before the navigation popover opens and before navigation target links are retrieved. navigate(oControlEvent)This event is fired after a navigation link on the navigation popover has been clicked. navigationTargetsObtained(oControlEvent)After the navigation targets have been retrieved, navigationTargetsObtained is fired and makes it possible you to change the targets. prefetchDone(oControlEvent)If the property prefetchNavigationTargets is set to true, event prefetchDone is fired after all navigation targets have been retrieved. Method Summary
attachBeforePopoverOpens(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforePopoverOpens event of this sap.ui.comp.navpopover.SemanticObjectController. attachNavigate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navigate event of this sap.ui.comp.navpopover.SemanticObjectController. attachNavigationTargetsObtained(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navigationTargetsObtained event of this sap.ui.comp.navpopover.SemanticObjectController. attachPrefetchDone(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the prefetchDone event of this sap.ui.comp.navpopover.SemanticObjectController. detachBeforePopoverOpens(fnFunction, oListener)Detaches event handler fnFunction from the beforePopoverOpens event of this sap.ui.comp.navpopover.SemanticObjectController. detachNavigate(fnFunction, oListener)Detaches event handler fnFunction from the navigate event of this sap.ui.comp.navpopover.SemanticObjectController. detachNavigationTargetsObtained(fnFunction, oListener)Detaches event handler fnFunction from the navigationTargetsObtained event of this sap.ui.comp.navpopover.SemanticObjectController. detachPrefetchDone(fnFunction, oListener)Detaches event handler fnFunction from the prefetchDone event of this sap.ui.comp.navpopover.SemanticObjectController. fireNavigate(mArguments?)Fires event navigate to attached listeners. registerControl(oSmartLink)Adds the given control to the SemanticObjectController and registers all relevant events. setEntitySet(sEntitySet)Sets a new value for property entitySet. setIgnoredState(oSmartLink)Checks if the given SmartLink has to be enabled or disabled and sets the state. unregisterControl(oSmartLink)Removes the given control from the SemanticObjectController and unregisters all relevant events. $, 
addCustomData, 
addDependent, 
addEventDelegate, 
applyFocusInfo, 
bindElement, 
clone, 
data, 
destroy, 
destroyCustomData, 
destroyDependents, 
destroyLayoutData, 
destroyTooltip, 
enhanceAccessibilityState, 
exit, 
findElements, 
fireEvent, 
focus, 
getCustomData, 
getDependents, 
getDomRef, 
getElementBinding, 
getFocusDomRef, 
getFocusInfo, 
getInterface, 
getLayoutData, 
getMetadata, 
getTooltip, 
getTooltip_AsString, 
getTooltip_Text, 
indexOfCustomData, 
indexOfDependent, 
init, 
insertCustomData, 
insertDependent, 
prop, 
removeAllCustomData, 
removeAllDependents, 
removeCustomData, 
removeDependent, 
removeEventDelegate, 
rerender, 
setLayoutData, 
setTooltip, 
toString, 
unbindElement addAggregation, 
addAssociation, 
applySettings, 
attachFormatError, 
attachModelContextChange, 
attachParseError, 
attachValidationError, 
attachValidationSuccess, 
bindAggregation, 
bindContext, 
bindObject, 
bindProperty, 
destroyAggregation, 
detachFormatError, 
detachModelContextChange, 
detachParseError, 
detachValidationError, 
detachValidationSuccess, 
findAggregatedObjects, 
fireFormatError, 
fireModelContextChange, 
fireParseError, 
fireValidationError, 
fireValidationSuccess, 
getAggregation, 
getAssociation, 
getBinding, 
getBindingContext, 
getBindingInfo, 
getBindingPath, 
getEventingParent, 
getId, 
getModel, 
getObjectBinding, 
getOriginInfo, 
getParent, 
getProperty, 
hasModel, 
indexOfAggregation, 
insertAggregation, 
invalidate, 
isBound, 
isInvalidateSuppressed, 
isTreeBinding, 
propagateMessages, 
removeAggregation, 
removeAllAggregation, 
removeAllAssociation, 
removeAssociation, 
setAggregation, 
setAssociation, 
setBindingContext, 
setModel, 
setProperty, 
unbindAggregation, 
unbindContext, 
unbindObject, 
unbindProperty, 
validateAggregation, 
validateProperty  Constructor Detail 
 new sap.ui.comp.navpopover.SemanticObjectController(sId?, mSettings?) 
 Constructor for a new navpopover/SemanticObjectController. 
 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 - navigationTargetsObtained : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- beforePopoverOpens : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- navigate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- prefetchDone : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
 
 In addition, all settings applicable to the base type sap.ui.core.Element 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 retrieved. Event can be used to change the parameters used to retrieve the navigation targets. In case of SmartLink, 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 control that fires this event. If beforePopoverOpensis registered on the SmartLink,originalIdis the same as the event's source ID which is also the SmartLink's ID. If thebeforePopoverOpensis registered on the SemanticObjectController,originalIdhelps to identify the original SmartLink control which triggered the event. | 
| {function} | oControlEvent.getParameters.open | This callback function triggers the retrieval of navigation targets and leads to the opening of the navigation popover. Signatures: open()IfbeforePopoverOpenshas been registered,openfunction has to be called manually in order to open the navigation popover. | 
- Since:
- 1.28.0
 navigate(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 control that fires this event. If navigateis registered on the SmartLink,originalIdis the same as the event's source ID which is the SmartLink's ID. Ifnavigateis registered on the SemanticObjectController,originalIdhelps to identify the original SmartLink control which triggered the event. | 
- Since:
- 1.28.0
 navigationTargetsObtained(oControlEvent)
 After the navigation targets have been retrieved, navigationTargetsObtained is fired and makes it possible you 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 control that fires this event. If navigationTargetsObtainedis registered on the SmartLink,originalIdis the same as the event's source ID which is also the SmartLink's ID. IfnavigationTargetsObtainedis registered on the SemanticObjectController,originalIdhelps to identify the original SmartLink control which triggered the event. | 
| {function} | oControlEvent.getParameters.show | This callback function shows the actual navigation popover. If the navigationTargetsObtainedhas been registered, theshowfunction 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 (such as SmartLink).{sap.ui.comp.navpopover.LinkData} oMainNavigation The main navigation object. If empty, property mainNavigationwill be used.{sap.ui.comp.navpopover.LinkData[]} aAvailableActions Array containing the cross-application navigation links. If empty, property actionswill be used.{sap.ui.core.Control} oExtraContent Control that will be displayed in extra content section on the popover.
 | 
- Since:
- 1.28.0
 prefetchDone(oControlEvent)
 If the property prefetchNavigationTargets is set to true, event prefetchDone is fired after all navigation targets have been retrieved. 
Parameters:
| {sap.ui.base.Event} | oControlEvent |  | 
| {sap.ui.base.EventProvider} | oControlEvent.getSource |  | 
| {object} | oControlEvent.getParameters |  | 
| {object} | oControlEvent.getParameters.semanticObjects | A map containing all semantic objects as keys for which at least one navigation target has been found. The value for each semantic object key is an array containing the available actions found for this semantic object. | 
- Since:
- 1.28.0
 Method Detail 
 sap.ui.comp.navpopover.SemanticObjectController.extend(sClassName, oClassInfo?, FNMetaImpl?): function
 Creates a new subclass of class sap.ui.comp.navpopover.SemanticObjectController with name 
sClassName and enriches it with the information contained in 
oClassInfo. 
oClassInfo might contain the same kind of information as described in sap.ui.core.Element.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.SemanticObjectController. 
Returns:
 Attaches event handler 
fnFunction to the 
beforePopoverOpens event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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.SemanticObjectController itself. 
 Event is fired before the navigation popover opens and before navigation target links are retrieved. Event can be used to change the parameters used to retrieve the navigation targets. In case of SmartLink, 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.SemanticObjectControlleritself | 
- Since:
- 1.28.0
Returns:
 Attaches event handler 
fnFunction to the 
navigate event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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.SemanticObjectController 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.SemanticObjectControlleritself | 
- Since:
- 1.28.0
Returns:
 Attaches event handler 
fnFunction to the 
navigationTargetsObtained event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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.SemanticObjectController itself. 
 After the navigation targets have been retrieved, navigationTargetsObtained is fired and makes it possible you 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.SemanticObjectControlleritself | 
- Since:
- 1.28.0
Returns:
 Attaches event handler 
fnFunction to the 
prefetchDone event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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.SemanticObjectController itself. 
 If the property prefetchNavigationTargets is set to true, event prefetchDone is fired after all navigation targets have been retrieved. 
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.SemanticObjectControlleritself | 
- Since:
- 1.28.0
Returns:
 Detaches event handler 
fnFunction from the 
beforePopoverOpens event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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:
 Detaches event handler 
fnFunction from the 
navigate event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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:
 Detaches event handler 
fnFunction from the 
navigationTargetsObtained event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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:
 Detaches event handler 
fnFunction from the 
prefetchDone event of this 
sap.ui.comp.navpopover.SemanticObjectController. 
 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:
 Fires event 
beforePopoverOpens to attached listeners. 
 Expects the following event parameters: 
- semanticObjectof type- stringThe semantic object for which the navigation targets will be retrieved.
- semanticAttributesof type- objectMap containing the semantic attributes calculated from the binding that will be used to retrieve the navigation targets.
- setSemanticAttributesof 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.
 
- setAppStateKeyof type- functionThis callback function sets an application state key that is used over the cross-application navigation. Signatures:- setAppStateKey(sAppStateKey)Parameter:
- originalIdof type- stringThe ID of the control that fires this event. If- beforePopoverOpensis registered on the SmartLink,- originalIdis the same as the event's source ID which is also the SmartLink's ID. If the- beforePopoverOpensis registered on the SemanticObjectController,- originalIdhelps to identify the original SmartLink control which triggered the event.
- openof type- functionThis callback function triggers the retrieval of navigation targets and leads to the opening of the navigation popover. Signatures:- open()If- beforePopoverOpenshas been registered,- openfunction 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.28.0
Returns:
 Fires event 
navigate to attached listeners. 
 Expects the following event parameters: 
- textof type- stringThe UI text shown in the clicked link.
- hrefof type- stringThe navigation target of the clicked link.
- semanticObjectof type- stringThe semantic object used to retrieve this target.
- semanticAttributesof type- objectMap containing the semantic attributes used to retrieve this target.
- originalIdof type- stringThe ID of the control that fires this event. If- navigateis registered on the SmartLink,- originalIdis the same as the event's source ID which is the SmartLink's ID. If- navigateis registered on the SemanticObjectController,- originalIdhelps to identify the original SmartLink control which triggered the event.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event | 
- Since:
- 1.28.0
Returns:
 Fires event 
navigationTargetsObtained to attached listeners. 
 Expects the following event parameters: 
- mainNavigationof type- sap.ui.comp.navpopover.LinkDataThe main navigation object.
- actionsof type- sap.ui.comp.navpopover.LinkData[]Array of available navigation target objects.
- ownNavigationof type- sap.ui.comp.navpopover.LinkDataThe navigation object for the own application. This navigation option is by default not visible on the popover.
- semanticObjectof type- stringThe semantic object for which the navigation targets have been retrieved.
- originalIdof type- stringThe ID of the control that fires this event. If- navigationTargetsObtainedis registered on the SmartLink,- originalIdis the same as the event's source ID which is also the SmartLink's ID. If- navigationTargetsObtainedis registered on the SemanticObjectController,- originalIdhelps to identify the original SmartLink control which triggered the event.
- showof type- functionThis callback function shows the actual navigation popover. If the- navigationTargetsObtainedhas been registered, the- showfunction 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 (such as SmartLink).
- {sap.ui.comp.navpopover.LinkData} oMainNavigation The main navigation object. If empty, property mainNavigationwill be used.
- {sap.ui.comp.navpopover.LinkData[]} aAvailableActions Array containing the cross-application navigation links. If empty, property actionswill 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.28.0
Returns:
 Fires event 
prefetchDone to attached listeners. 
 Expects the following event parameters: 
- semanticObjectsof type- objectA map containing all semantic objects as keys for which at least one navigation target has been found. The value for each semantic object key is an array containing the available actions found for this semantic object.
Parameters:
| {Map} | mArguments? | The arguments to pass along with the event | 
- Since:
- 1.28.0
Returns:
 getEntitySet(): string
 Gets current value of property 
entitySet. 
 The name of the entity set used. If entitySet has not been defined, the SemanticObjectController tries to retrieve the name from its parents. Note: This is not a dynamic UI5 property. 
- Since:
- 1.28.0
Returns:
| {string} | Value of property entitySet | 
 getFieldSemanticObjectMap(): object
 Gets current value of property 
fieldSemanticObjectMap. 
 Maps the field names to the related semantic objects. When accessing this property for the first time, the mapping will be calculated from the metadata within the provided model. 
- Since:
- 1.28.0
Returns:
| {object} | Value of property fieldSemanticObjectMap | 
 getIgnoredFields(): string
 Gets current value of property 
ignoredFields. 
 Comma-separated list of field names that must not be displayed as links. 
- Since:
- 1.28.0
Returns:
| {string} | Value of property ignoredFields | 
 getPrefetchNavigationTargets(): boolean
 Gets current value of property 
prefetchNavigationTargets. 
 If set to true, the SemanticObjectController will retrieve all navigation targets once and will disable links for which no targets were found. Setting this value to true will trigger an additional roundtrip. 
 Default value is false. 
- Since:
- 1.28.0
Returns:
| {boolean} | Value of property prefetchNavigationTargets | 
 hasSemanticObjectLinks(sSemanticObject): boolean
 Checks if the given semantic object name has a navigation link. Note: this method returns a valid value only after the event prefetchDone has been raised. The event prefetchDone is raised if the property prefetchNavigationTargets is set to true. 
Parameters:
Returns:
| {boolean} | true if the semantic object has known navigation links | 
 registerControl(oSmartLink)
 Adds the given control to the SemanticObjectController and registers all relevant events. 
Parameters:
 Sets a new value for property 
entitySet. 
 The name of the entity set used. If entitySet has not been defined, the SemanticObjectController tries to retrieve the name from its parents. Note: This is not a dynamic UI5 property. 
 When called with a value of null or undefined, the default value of the property will be restored. 
Parameters:
| {string} | sEntitySet | New value for property entitySet | 
- Since:
- 1.28.0
Returns:
 Sets a new value for property 
fieldSemanticObjectMap. 
 Maps the field names to the related semantic objects. When accessing this property for the first time, the mapping will be calculated from the metadata within the provided model. 
 When called with a value of null or undefined, the default value of the property will be restored. 
Parameters:
| {object} | oFieldSemanticObjectMap | New value for property fieldSemanticObjectMap | 
- Since:
- 1.28.0
Returns:
 Sets a new value for property 
ignoredFields. 
 Comma-separated list of field names that must not be displayed as links. 
 When called with a value of null or undefined, the default value of the property will be restored. 
Parameters:
| {string} | sIgnoredFields | New value for property ignoredFields | 
- Since:
- 1.28.0
Returns:
 setIgnoredState(oSmartLink)
 Checks if the given SmartLink has to be enabled or disabled and sets the state. 
Parameters:
 Sets a new value for property 
prefetchNavigationTargets. 
 If set to true, the SemanticObjectController will retrieve all navigation targets once and will disable links for which no targets were found. Setting this value to true will trigger an additional roundtrip. 
 When called with a value of null or undefined, the default value of the property will be restored. 
 Default value is false. 
Parameters:
| {boolean} | bPrefetchNavigationTargets | New value for property prefetchNavigationTargets | 
- Since:
- 1.28.0
Returns:
 unregisterControl(oSmartLink)
 Removes the given control from the SemanticObjectController and unregisters all relevant events. 
Parameters: