Navigation History Widget
The Navigation History widget stores any communication going through. It enables direct switching to any of the items that were viewed previously.
The widget registers as a listener on all defined virtual input sockets. Every message received from all of those sockets is put into history queue. It can be sent further through configured virtual output socket (depending on widget instance settings). You can display the history that is saved, and choose to resend any of the stored communications. If so, then stored messages are sent through appropriate output, and then the chosen item is displayed.
Widget Definition
| Name | Navigation History |
| ID | com.hybris.cockpitng.navigationhistory |
| Category | Navigation |
| Description | Stores the history of sockets communication and allows resending of any of the stored messages. |
| Applied In | Not applicable |
| Based On | Not applicable |
| Author | SAP |
| Inputs | Details of input socket:
|
| Outputs | Details of output socket:
|
| Generated Events | Not applicable |
Configuration
Not applicable.
Widget Preview
General widget preview:
The widget consists of a Back button and history stack button with a three dots image
A widget preview with no history stored. When you enter editor area of the first product, the widget looks inactive as no data is stored yet. After you move between your products, the widget becomes active as it starts gathering the data.
The widget stores data of the items you viewed. You can either click the Back button and move to the last viewed item or you can click the Three Dots icon (history stack) and choose the item you what to view again. When you click the chosen item, the Navigation History widget clears data of the items you viewed in between (visible above on the list). However, it still keeps the data of the items seen before the one you chose (visible below on the list).
Settings
| Setting | Type | Description |
|---|---|---|
| historyLength | java.lang.Integer | Maximum number of messages stored in history. Default value: 10. |
| defaultOutput | java.lang.String | Name of virtual output socket that should be used if no other is configured. |
| proxyEnabled | java.lang.Boolean | If true then any message received on any input sockets is immediately sent through appropriate output socket. Otherwise it is only stored in communication history. Default value: Maximum number of messages stored in history. Default value: false. |
| emptyHistoryOutputValueEval | java.lang.String | Value of this setting is used as SPEL expression. The SPEL expression is used to evaluate the value sent on socketemptyHistoryBackButtonPressed socket when Back button is clicked and history is empty. |
Whenever input message is received from input socket and proxy is enabled, widget looks for a setting called %INPUT_SOCKET_NAME%_output. It assumes that a value would be a name of output socket that should be used to send this message further. If not found, then value from defaultOutput is taken. The same mechanism is used when you click any element of history and/or Back button.
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. |