Building a dynamic channel on the iPlanet Portal Server Front Page

I want to build a dynamic channel. That means exactly that I want a

channel to be change, when i click on a link, on the front page without changing anything else. I

have read that this is possible with a "custom content provider" and the

"DesktopURL" class.

My problem is: When i click on a link i have to identify him, how can i

do that (extract the parameter from the given URL?) ?

I have made some specific code, maybe there are more issues

(mistakes)....

thanks

-- Specific Code in my dynProvider

--

public class dynProvider extends ProviderAdapter implements Provider {

public dynProvider() {

}

//public StringBuffer getContent(Map m) throws ProviderException {

public StringBuffer

getContent(javax.servlet.http.HttpServletRequest

httpRequest,javax.servlet.http.HttpServletResponse httpResponse) throws

ProviderException {

Session s = getSession();

DesktopURL test = new DesktopURL(getSession(),

action=content&provider=iwtdynProvider&val=1");

DesktopURL inhalt = new DesktopURL(getSession(),

action=content&provider=iwtdynProvider&val=2");

StringBuffer content = new StringBuffer("");

StringBuffer content1 = new StringBuffer("");

StringBuffer content2 = new StringBuffer("");

StringBuffer content3 = new StringBuffer("");

content.append("<A HREF=\"");

content.append(test.toString());

content.append("\">Test</A>");

content.append("
");

content.append("<A HREF=\"");

content.append(inhalt.toString());

content.append("\">Inhalt</A>");

if (data == null || data.equals("1")){

content1.append("<A HREF=\"/desktop/Seite1.html\">Seite 1</A>");

return content1;

}

else if (data.equals("2")) {

content2.append("<A HREF=\"/desktop/Seite2.html\">Seite 2</A>");

return content1;

}

else if (data.equals("3")) {

content3.append("<A HREF=\"/desktop/Seite3.html\">Seite 3</A>");

return content1;

}

return content;

}

-- Specific Code in my dynProvider

--

[2311 byte] By [708785] at [2007-11-25 4:34:26]
# 1

It is simpler to override the getContent(java.util.Map m) version of this method. You can then use the get(Object o) method on the java.util.Map class to retrieve parameters from the URL.

(Note: You say you want the channel to change without changing anything else, but Portal Server updates the whole desktop whenever anything changes. You cannot update the content of a single channel in isolation.)

Stephen_Szalla at 2007-6-29 2:45:31 > top of Java-index,Web & Directory Servers,Portal Servers...