Generic Bookmarks Handler Widget

Generic Bookmarks Handler Widget allows you to implement support for bookmarks in Backoffice.

Widget Definition

Name Generic Bookmark Handler
ID com.hybris.cockpitng.genericbookmarkhandler
Category Bookmark support
Description Generic widget that allows you to consume bookmarks (#bookmark) in the URL using custom strategies.
Applied In Not applicable
Based On Not applicable
Author SAP
Inputs No input sockets.
Outputs Details of output sockets:
  • defaultEntity
    • Type: java.lang.Object
    • Multiplicity: Single
    • Description: Widget emits the entity specified by provided PK.
Handled Global Events Details of consumed global events:
  • Bookmark change
    • Name: ON_BOOKMARK_CHANGE
    • Data: Collection<BookmarkEvent>
    • Description: Listens for ON_BOOKMARK_CHANGE event and calls BookmarkHandler bean.

Configuration

Not applicable.

Widget Preview

Not applicable.

Settings

Setting Type Description
handlerBean java.lang.String BookmarkHandler bean used to resolve bookmarks.

Widget Slots

slotID Multiplicity Type Slots Composition
cockpitWidgetChildrenInvisible multi Not applicable. 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.

Example of Usage

See the example of the Generic Bookmarks Handler usage in widgets.xml:
<widget id="standardBookmarkHandler" widgetDefinitionId="com.hybris.cockpitng.genericbookmarkhandler" slotId="cockpitWidgetChildrenInvisible" template="false">
	<setting key="handlerBean" value="customBookmarkHandler"/>

	<virtual-sockets>
		<output id="aSocket" type="java.lang.Object" />
		<output id="anotherSocket" type="java.lang.String" />
		<!-- The sockets can come in any number and can be connected as standard sockets with other widgets; the handler can use them via WidgetInstanceManager -->
	</virtual-sockets>
</widget>