[jboss-user] [JBoss Portal] - Adding custom Window Property

d.haslinger do-not-reply at jboss.com
Fri May 9 06:05:36 EDT 2008


Hello!

I've written a custom portlet that displays the content of an html file from the filesystem.
The location of this file is set by a custom property called "content", which value contains the path to the html file. 

Currently I'm setting this property manually directly in the portal.

In the doView() method of the portlet, i receive the properties with:

  | PortalNode node = Navigation.getCurrentNode();
  | Map props = node.getProperties();

This works fine, but the problem is that I do not want to add the content property manually each time, I want to add it directly in the code, like:


PortalNode node = Navigation.getCurrentNode();
  | Map props = node.getProperties();
  | 		
  | if(!props.containsKey("content")){
  | 	props.put("content", "/html/file.html");
  | }

But this throws a java.lang.UnsupportedOperationException.

Can any one please help me with this?

Thanks a lot in advance,
Daniel

Server: 4.2.2
Portal: 2.6.3

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

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



More information about the jboss-user mailing list