Show TOC

Smart LinkLocate this document in the navigation structure

The sap.ui.comp.navpopover.SmartLink control provides a popover with navigation links to related applications, for example, more detailed information about customer data.

Overview

The SmartLink control provides further navigation information for a certain entity and offers the following options for navigation:

  • Main navigation target

  • Additional content, which can be customized

  • Links to related apps, for example

Within a SmartTable or SmartForm control, the SmartLink control is created automatically if the SemanticObject annotation has been defined in the metadata of the OData service used. Navigation targets are determined by the SmartLink control and its classes using the CrossApplicationNavigation service of the unified shell.

The events of the SmartLink control allow the consuming application to do the following in the popover:
  • Add, edit, or remove

    • Texts

    • Parameters

    • Navigation targets

  • Add an additional customized area

Semantic Object Annotation

SmartLink controls can be created in XML views or in the coding. However, it is recommended to use the SemanticObject definition of the OData metadata. This ensures that the SmartLink controls are instantiated in a correct manner.

The following example shows a SemanticObject annotation:

Sample Code
<Annotations Target="FAR_CUSTOMER_LINE_ITEMS.Item/AccountingDocument" xmlns="http://docs.oasis-open.org/odata/ns/edm">
	<Annotation Term="com.sap.vocabularies.Common.v1.SemanticObject" String="AccountingDocument"/> 
</Annotations>

SemanticObjectController

Within a SmartTable or SmartForm control, the SemanticObjectController class is used as a central instance that is exposing the automatically generated events of the SmartLink control.

All events of the SmartLink control and the features of the navigation popover connected to it are registered with the SemanticObjectController class and are thus available for use by the consuming application from one single source.

In addition, the SemanticObjectController class enables further features that influence the behavior of the registered SmartLink controls within the SmartTable or SmartForm controls.

The SemanticObjectController class can be set up in the XML view as well as in the coding of the SmartTable and the SmartForm controls. All SmartLink controls in a SmartTable or SmartForm control will automatically get registered with the SemanticObjectController class provided.