This document shows how to set the title of your portlet at runtime. Jetspeed has some special requirements for setting the portlet title at runtime. We demonstrate the configuration requirements, and then how to set the title in your Java portlet code.
In the portlet registry, declare your portlet:
You must make sure that the parent portlet is GenericMVCPortlet or a derivitive portlet.
The view type must be set to BufferedJSP:
Setting the portlet title at runtime is done in your portlet code, from an MVC action, buildNormalContext, or the portlet's getContent() methods. Here is an example of setting the title in a portlet actions buildNormalContextGeneric method.
Note again, we must derive from the MVC portlet framework. Here we extend GenericMVCAction:
Remember to use the new signature, as the single parameter signature of setTitle does not work!
Make sure to have a PSML entry that uses the BufferredTitlePortletControl as this is a requirement. (This control can also be selected in the portlet customizer)
To make the the buffered title control the default for all portlets, set the following property in your JetspeedResources.properties.merge (or my.properties):