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
--

