Global Links Widget

The Global Links widget allows you to open different SAP applications directly from the Backoffice. It is placed on the System Toolbar and provides direct links to the sites you choose.

Widget Definition

Name Global Links
ID com.hybris.cockpitng.widgets.common.globalLinks
Category Not applicable
Description The widget allows the user to define links to external applications.
Applied In System Toolbar - root of entire Backoffice application
Based On Not applicable
Author SAP
Inputs Not applicable
Outputs Not applicable
Generated Events Not applicable

Configuration

Configuration of this widget is defined by the links.xsd file.

The following elements can be used in your configuration file:

  • Links: a grouping element for provided links

  • Link: allows to define links to external application

    • @label(java.lang.String): label key used to obtain link name; if a given key does not exist in any localization files, it is used as a name of the link. This attribute allows to merge configurations.
    • @icon(java.lang.String): an url to an icon, possible urls are:
      • resource from your extension, for example: extension/resources/cockpitng/cng/images/icon.png; then you should specify /cng/images/icon.pngw
      • resource from a widget, for example: /widgetClasspathResource/widgets/globalLinks/images/signet-billing.svg; you can use some icons delivered out of the box for widgets, check config example which utilizes all available icons
      • http link to an image
    • @url(java.lang.String): address, which is opened on a click; if url is empty, clicking the link does not perform any operation
    • @target: link target; the default setting is _self, it opens the linked document in the same window where it was clicked; _blank setting opens the linked document in a new window or tab
    • @merge-mode (com.hybris.cockpitng.core.config.impl.jaxb.hybris.commonconfig.MergeMode), optional: Defines configuration merging mode. Possible values: merge, replace, remove. Default value: merge.

    • @position(int): position of the link in the links

Basing on the schema above, you can have, for example, the following configuration:

<context component="global-links">
	<ln:links xmlns:ln="http://www.hybris.com/cockpitng/config/links">
		<ln:link label="global.links.commerce" icon="/widgetClasspathResource/widgets/globalLinks/images/signet-commerce.svg" target="_blank" position="0"/>
		<ln:link label="global.links.marketing" icon="/widgetClasspathResource/widgets/globalLinks/images/signet-marketing.svg" target="_blank" url="http://go.sap.com/solution/lob/marketing.html"/>
		<ln:link label="global.links.sales" icon="/widgetClasspathResource/widgets/globalLinks/images/signet-sales.svg" target="_blank" url="http://go.sap.com/solution/lob/sales.html"/>
		<ln:link label="global.links.billing" icon="/widgetClasspathResource/widgets/globalLinks/images/signet-billing.svg" target="_blank" url="http://go.sap.com/solution/lob/commerce/billing-revenue-innovation-management.html"/>
		<ln:link label="global.links.service" icon="/widgetClasspathResource/widgets/globalLinks/images/signet-service.svg" target="_blank" url="http://go.sap.com/solution/lob/service.html"/>
	</ln:links>
</context>

If there is no configuration specified in cockpit-config.xml file the widget's icon is hidden and is not visible in the System Toolbar.

Widget Preview

Figure1: General preview of the widget.

Figure2: The widget view after clicking. You can see tiles, which represent links to relevant applications/websites. Links in this image are based on the configuration example.

Settings

Setting Type Description
linksComponentName java.lang.String Name of configuration component. Default value: global-links.
hideIfEmpty java.lang.Boolean If set to true, the widget (button) is hidden if there are no links configured.

Widget Slots

slotID Multiplicity Type Slots Composition
cockpitWidgetChildrenInvisible multi Not applicable. This is a general-purpose slot available for widgets. Any widget placed on this slot is not displayed in the application view but can be accessed through its socket API.