Client side API documentation in the source code

Starting from version 6.1, IBM provides very powerful client side API. The client side API is nothing but set of dojo classes that are provided as public API by IBM. One problem with the client side API is that there is not much documentation available around it, i was able to find very good documentation in the source code.

The WebSphere\wp_profile\installedApps\sunpa\wps.ear\wps.war\themes\dojo\portal_dojo\ibm\portal\portlet\portelet.js file has all the source code for the client side API and good things is it has very good inline documentation. The portlet.js has close to 1700 lines of code, but the code is built using Dojo so it very easy to read and well structured.

This screen shot is from my machine which shows documentation for setPortletState method

The setPortletState methos is part of ibm.portal.portlet.PortletWindow and allows you to change the portlet state on the client side, if the method is called from page built using the Client Side Aggregation theme then the callback function decides how to react to the state change but in case of Server side aggregation theme it will result in page refresh

No comments: