WebSphere Portal Server - Problem with URLGeneration

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > June 2004 > Problem with URLGeneration





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem with URLGeneration
Justin Rosenberg

2004-06-21, 5:50 pm

PLEASE HELP!

I have figured out how to create a link that sets the current Portlet to
SOLO mode.

<a href="<portletAPI:createURI state="Solo"/>">Self</a>

But I can't seem to create a link to start a Portlet in SOLO State on a
seperate page. Documentation says I should do it like this:

<wps:urlGeneration contentNode="2P" compositionNode="aboutPortal"
portletWindowState="Solo" pacCheck="NoCheck">
<a href="<% wpsURL.write(out); %>">Solo</a>
</wps:urlGeneration>

Where "2P" is the unique name of the Page containing the Portlet with
the unqiue name of "aboutPortal". This command does create the link,
but the Portlet "aboutPortal" does not start in the SOLO State.

The tag produces:
http://localhost:9081/wps/myportal/!ut/p/_s.7_0_A/7_0_FQ?cID=6_0_LU&nID=7_0_P2

It should produce something that looks like:
http://localhost:9081/wps/myportal/!ut/p/_s.7_0_A/7_0_P2/.cmd/ad/.ps/S/.c/6_0_LU/.ce/7_0_P4/.p/5_0_LT/.d/0#7_0_P4



I even tried to do it with some Java code, but I still get the same result:

<%
String URL = "none";
try
{

ObjectID contentNode = ObjectID.read("2P");
ObjectID compNode = ObjectID.read("aboutPortal");
CreateUrlCommand command = new CreateUrlCommand();
command.setRunData(com.ibm.wps.engine.RunData.from(request));
command.setContentNode(contentNode);
command.setCompositionNode(compNode);
command.setPortletWindowState(CreateUrlCommand.PORTLET_MAX);
command.setPacCheck(CreateUrlCommand.PAC_NO_CHECK);
command.setRequestID(true);
command.execute();
URL = command.getURL().toString();
}
catch(Exception e)
{
URL = e.getMessage();
}
%>
<BR>
This is the result <%=URL%>
<BR>
<a href="<%=URL%>"> Try this </a>
<BR>

Please help. Thank you.

Justin
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com