Live text for click-to-action
IBM WebSphere Portal supports a live text API for end user controlled data transfer between components. With live text, a component on a page, for example a portlet or navigation element, can declare sources and targets for data transfer.
When the user clicks on a source element, the portal displays a context 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).
Both sources and targets are specified by HTML markup that apply live text elements. The markup attributes mark the HTML fragment as a click-to-action tag.
- Sources of click-to-action menus provide a data item for other components on the page. The data item type name determines the targets that can handle this data item.
- Targets specify the type name they are interested in and a display title for the click-to-action menu item that represents the target entry.
Targets 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.
All components that contribute HTML markup to a page can contain live text sources and targets, including...
- IBM portlets
- JSR standard portlets
- theme and skin components
- WCM content
- Web clippings
Portlets can register their portlet action or render URLs as server-side targets, but you can also define targets within one portal page that point to another page or even to a CGI handler outside the portal.
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.
If a portlet provides the following server side communication targets, they will automatically be made available for click-to-action on all pages that contain the portlet:
- Portlet events declared by a JSR 286 portlet in portlet.xml with a payload type of java.lang.String.
- Cooperative portlet actions declared by JSR 168 portlets in a WSDL deployment descriptor with an input property of class java.lang.String.
Portlets that use these declarations do not need to generate semantic tagging markup for click-to-action targets.
Administrators can turn off the automatic generation of click-to-action targets by specifying a portlet preference...
com.ibm.portal.c2a.target.generation = false
See
- Live text formats
- Integrating click-to-action targets with the person menu
- Relation to cooperative portlet wiring
- Comparison of the new features with click-to-action in IBM portlets
Parent topic
Web 2.0 user interface features