System News
   
News about Solaris and Sun Microsystems

Free 2 Week Trial!


February 5, 2007
Article #17592
Volume 108, Issue 1
Section: Developer

 

The article refers to an updated version of the sample, AJAX Portlet Invoice Viewer, from the original article
 


 

Best Practices for Applying AJAX to JSR 168 Portlets
Maintaining Portlet State, Using a JavaScript Library and More

Staff engineer at Sun, Greg Ziebold, and writer Marina Sum, present a technical article on the Sun Developer Network (SDN) on how to use AJAX in portlets that comply with the JavaTM Specification Request (JSR) 168: Portlet Specification.

JSR 168 defines a set of APIs for Portal computing addressing the areas of aggregation, personalization, presentation and security.

The tech tip explains the problem with using AJAX with JSR 168 portlets currently, which is that you cannot make asynchronous calls to portlets through portlet URLs (see an image of the problem). Until Portlet Specification 2.0 (JSR 286) offers better solutions, there is another way:

"Because a portlet is a Web application that can contain other resources, such as servlets and JSP pages, you can make the asynchronous requests to the resources that are bundled with the portlet. For instance, the Invoice Viewer sample includes a servlet that you can call to asynchronously render new content in the portlet. To take maximum advantage of this flexibility, the portlet and the servlet should be able to share information between themselves." The authors explain how to make that happen.

Sections in the technical article are:

  • Maintaining Portlet State
  • Using a JavaScript Library
  • Understanding Namespace Collisions
  • Deploying the Sample
  • Building the Sample

See the SDN for the full article. [...read more...]

Keywords:
Other articles in the Developer section of Volume 108, Issue 1:

See all archived articles in the Developer section.


From the latest issue:



 


Customized news reports about Sun Microsystems. Just the news you need, none of what you don't.
50,000+ Members. 20,000+ Articles Published since 1998.