WAS v8.5 > Develop applications > Develop Portlet applications > Portlet aggregation and preferences

Portlet coordination

We can use either the events mechanism or the public render parameters mechanism to coordinate portlets within a portal.

JSR 286 defines these two mechanisms as follows:

The WebSphere Application Server portlet container supports both concepts with one exception. The wiring of events on a portal level is not supported.

To make use of the public render parameters on a portal page defined with the aggregation tag library, explicitly declare the portal scope:

<!-- define portal scope for public render parameters --> <portlet:scope>   <portlet:portlet context="/simpleportlet" portletname="SimplePortlet1" windowId="id1"/
  <portlet:portlet context="/simpleportlet2" portletname="SimplePortlet2" windowId="id2"/> </portlet:scope>
<portlet:init portletURLPrefix="/my-webapp-context/my-portal-jsp-url-pattern/"> <!-- insert your portlets here, wrapped with your html markup --> ...
   <portlet:insert url="simpleportlet/SimplePortlet1" windowId="id1" titleVar="portlettitle_1"/> ...
   <portlet:insert url="simpleportlet2/SimplePortlet2" windowId="id2" titleVar="portlettitle_1"/> ...
</portlet:init>

The public render parameters are only visible to the portlet windows mentioned within this defined scope. This condition assumes, as a prerequisite, the corresponding portlets have also declared support for a given public render parameter in their portlet.xml file, according to the JSR 286 specification:

...
   <portlet>       <portlet-name>portlet_name1</portlet-name>        ...
       <supported-public-render-parameter>foo</supported-public-render-parameter>    </portlet>    <portlet>       <portlet-name>portlet_name2</portlet-name>        ...
       <supported-public-render-parameter>foo</supported-public-render-parameter>    </portlet>    <public-render-parameter>        <identifier>foo</identifier>        <qname xmlns:x="http://example.com/params">x:foo2</qname>    </public-render-parameter> ...


Related concepts:

Portlet container
Portlet aggregation using JSP
Portlet URL security
Supported optional features of the JSR-286 Portlet Specification


Related


Tasks: Managing portlets
Configure portlet fragment caching


Reference:

Portlet container settings
Aggregation tag library attributes


Related information:

JSR 286 Portlet Specification

Exploiting the WAS V6.1 portlet container: Part 2: Going beyond the basics

What's new in the Java Portlet Specification V2.0 (JSR 286)?


+

Search Tips   |   Advanced Search