Determine which client side APIs the current portal page provides

At any time during portlet request processing, a portlet can query on the server side which client side APIs are available in the theme of the current page.

To obtain this information, use the portlet request attribute com.ibm.portal.theme.client.capabilities. This works both for standard portlets and for IBMportlets. Example code snippet:

Map<String, String> themeClientCapabilities = (Map<String, String>) 
        request.getAttribute("com.ibm.portal.theme.client.capabilities");
     String dojoVersion = themeClientCapabilities.get("dojo");

As the sample shows, the returned object is a java.util.Map with String keys and String values. A value is always a version number of the format major.minor.revision, where the revision information is optional. The following list shows the predefined keys and their meaning:
dojo


iwidget


mashups.enabler


oneUI

You can override and extend these API key and version pairs by editing the metadata of the current theme. To perform this task, do the following:

  1. Navigate to the following WebDAV URL: http://server_name:WC_default_host/wps/mycontenthandler/dav/themelist/all/theme.name/

  2. Edit metadata.properties as appropriate.

The syntax of a valid entry is as follows: theme.capability.api-key=version. For example, for DOJO, use an entry as follows: theme.capability.dojo=1.4.3


Parent

Interaction between widgets and portlets by shared render parameters


Related tasks

http://www.dojotoolkit.org/

http://www-01.ibm.com/software/info/mashup-center/

 


+

Search Tips   |   Advanced Search