O'Reilly logo

JBoss Portal Server Development by Ramanujam Rao

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JSR-286 and AJAX

Among the set of features that the new portlet specification JSR-286 introduces to make things easier for AJAX implementations, are the options to directly communicate with the portlet through shared render parameters and resource serving.

Referring back to the workaround option in JSR-168, the new specification provides a standard for setting and receiving render parameters, and we no longer have to deal with manual copying OF context and parameters.

To set the render parameter directly to the response, all we have to do is this:

public class AssetPortlet extends GenericPortlet {
public void processAction(ActionRequest request, ActionResponse response) {
response.setRenderParameter("rate", "4.5");
}
...
}

To receive render parameters ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required