The coordination samples show how events can be wired and how public parameters can be bound.
To understand the samples of any of a subpage you will need to have a look at the corresponding
portlet.xml and the default-object.xml for this sample application.
On this page you can see one usage of shared parameters aliasing. Say you bought a portlet that displays the weather forecast
for a location, and found on the web another portlet that displays the map for a zipcode.
Here we supposed that the two portlets are installed on the server without any change to their code or descriptors.
The first portlet could define a public render parameter like:
<public-render-parameter>
<identifier>your_zipcode</identifier>
<name>zipcode</name>
</public-render-parameter>
The second portlet could have defined it like that:
<public-render-parameter>
<identifier>my_zipcode</identifier>
<qname xmlns:coor="urn:jboss:portal:samples:coor">coor:zipcode</qname>
</public-render-parameter>
We would like to alias those render parameters to a page parameter, so that without any change to the code we can pass a URL parameter by adding "?zip=20878" to define the
zipcode to use for both portlets.
To do so we can either use the admin portlet or in our default-object.xml descriptor add the following:
<coordination>
<bindings>
<alias-binding>
<id>zip</id>
<qname>zipcode</qname>
<qname>{urn:jboss:portal:samples:coor}zipcode</qname>
</alias-binding>
</bindings>
</coordination>
Now try to add "?zip=20878" to your URL to see it in action. Alternatively, you can also fill-in the form on the other portlet to define the page parameter.