[jboss-user] [JBoss Portal] - Re: Add portlet display name programatically.

je.a.le do-not-reply at jboss.com
Fri Mar 13 10:59:10 EDT 2009


Override the getTitle method in the portlet code, and return your own portlet's title. 
Nota : getTitle is called first, and outside any "processAction/doView" operation, depending on how you get your data, you may have to do it twice.

If the name only change only according to page node, you can used properties too.
Here a sample code i used, 

  | public class xxxxPortlet extends JBossPortlet {
  | // other relevant code here.....
  | @Override
  | 	protected String getTitle(RenderRequest request) {
  | 		return (String) (((JBossRenderRequest) request).getPortalNode().getProperties().get("title"));
  | 	}
  | }
  | 


View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4217891#4217891

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4217891



More information about the jboss-user mailing list