Live text for click-to-action | HCL Digital Experience
HCL Digital Experience supports a live text API for user controlled data transfer between components. With live text, a component on a page can declare sources and targets for data transfer. For example, this can be a portlet or a navigation element. When the user clicks on a source element, the portal displays a menu listing targets that match the selected source. When a menu item is selected, the portal invokes the corresponding target passing it the source data. This process is called Click-to-Action (C2A).
- Sources of click-to-action menus provide a data item that is potentially relevant for other components on the page. The data item has an associated type name that is used to determine the targets that can handle this data item.
- Targets specify the type name that they are interested in and a display title for the click-to-action menu item that represents the target entry. They provide a handler for the received data either as JavaScript code or as a server-side URL to which the data is sent when the menu item is selected.
Click-to-action treats all source data as unstructured text. You can encode any information in the source value, but the target handler is responsible for decoding the received data appropriately.
- Portlet events declared by a JSR 286 portlet in
portlet.xml
with a payload type ofjava.lang.String
. - Cooperative portlet actions declared by JSR 168 portlets in a WSDL deployment descriptor with an
input property of class
java.lang.String
.
Administrators can turn off the automatic generation of click-to-action targets by specifying a
portlet preference com.ibm.portal.c2a.target.generation = false
.