Semantic tagging for click-to-action
IBM® WebSphere® Portal Express supports a semantic
tagging API for end user controlled data transfer between components. With
semantic tagging, 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 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 is semantically
tagged. This means that the HTML markup contains special attributes that marks
the HTML fragment as a click-to-action tag.
- 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.
As both sources and targets are defined by semantic tagging, all components
that contribute HTML markup to a page can provide sources and targets. This
includes IBM portlet and, JSR standard portlets, and theme and skin components,
as well as WCM content or 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 Common Gateway
Interface (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.
Click-to-action also integrates with the server side portlet communication
programming model as follows: 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.
Therefore portlets that use these declarations do not need to generate
semantic tagging markup for click-to-action targets.
- Semantic tagging formats
Semantic tagging of sources and targets is based on special HTML classes that are attached to elements of the HTML markup. Note that the class attribute can be attached to any HTML element and that it can have multiple values, separated by spaces. Therefore you can annotate any HTML element in your output with a click-to-action class, even if it has already a class attribute for CSS formatting.
- Integrating click-to-action targets with the people menu
Target actions for semantic tagging based click-to-action can also integrate with the person context menus that are generated for hCard microformats found in the page markup (see TBD).
- Relation to cooperative portlet wiring
You can use both semantic tagging and cooperative portlet wires to exchange data between portlets on a page.
- Comparison of the new features with click-to-action in IBM portlets
The user experience of semantic tagging based click-to-action is similar to that of the click-to-action JSP tags that are available for IBM portlets.
Parent topic: portlets, introduces the concepts of the APIs used to develop portlets, and provides samples to get you started. It also provides information on integrating features such as single sign-on, cooperative sharing of information using the property broker, and migrating Struts applications to the portlet environment.">Developing portlets
|
|
|