Skip to Main Content

Application Development Software

Better way or alternative to renderResponse.createActionURL()??

648328Jul 10 2008 — edited Jul 18 2008
In a Java class I am trying to display content from a node given it's path... the catch is that it can be different types so we are using createActionURL from the renderResponse object... The issue is that depending on the portlet we are calling it from (some jsr168, some not) renderReponse is not available... Is there an alternative or better way to do this in JAVA?

##Current Code##
PortletURL contentUrl = renderResponse.createActionURL();
contentUrl.setParameter("ACTION", "displayContent");
contentUrl.setParameter("path", getNodePath(node.getProperty("contentPath").getValue().getStringValue().replaceAll("\\\\","/")) );
contentUrl.setParameter("displayImage", "true");
url = contentUrl.toString();
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 15 2008
Added on Jul 10 2008