views:

461

answers:

1

Here is the scenerio: We have an application running on Webphere Portal Server 6.1 and Spring MVC. There is a page with a single portlet that shows a grid full of records. Once one of those records is clicked, it must navigate to another portlet that resides on a different page - possibly even a different portlet application on the same portal server - and display that specific record.

Here's the question: I've read that, through the use of Portal 2.0's "Public Render Parameters", you can share data between portlets - and that should solve most of my problems. The trouble is, I cannot find how that works when using Spring MVC. I can't find a reference to "Public Render Parameters" in the spring MVC technical documentation, yet some people have said they have it working. Can someone show me specifically where the detailed documentation on this is, or give me small code snippit of an example that shows how I can access these public render parameters in my controller classes? Also, if there is a better way to achieve this in my environment, what is it and where can I find an example? Please don't answer with, "If you need to do this, you shouldn't be using a portal" or "If you use XYZ technology instead, then you can do this and that". I cannot change the environment - it is what it is - I just need to make it work! :) Thanks!

+2  A: 

You can use public render parameters in the same way as you use your own render parameters. You just have to declare them in your portlet.xml. Just be aware that you are not allowed to have public render parameters that have the same name as "private" render parameters.

You only need to add something like this to your portlet.xml:

<public-render-parameter>
      <identifier>myParam</identifier>
      <qname xmlns:x="http://sun.com/params"&gt;x:myParam&lt;/qname&gt;
</public-render-parameter>

and add the following line to your portlet descriptor:

<portlet>
      . . .
     <supported-public-render-parameter>myParam</supported-public-render-parameter>
</portlet>

Then you can use the regular getRenderParameter calls for "myParam" in all portlets that have this entry in their portlet descriptor.

For more information: http://blogs.sun.com/deepakg/entry/jsr286_public_render_parameter_feature

Patrick Cornelissen
Yes - I think this will work. My confusion came with the annotation based model for controllers, because you do not inherit from a class or implemenent an interface. After looking at some more examples in conjunction with your example, I understand. Thanks again for helping an unexperienced portlet developer! There are about 16 java frameworks we're using in a heavily transactional SOA based Portal application. It's a lot to take in coming from a .net background!
komma8.komma1