Requires Free Membership to View
Register today to access targeted resources from our editorial writers and independent industry experts focused on Lotus Domino, Notes, Workplace and other related technologies.
// Last mods 020506.105101 - dhatter@libertastechnologies.com - www.libertastechnologies.com
import lotus.domino.*;
import java.util.*;
import java.io.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session nsCurrent = getSession();
AgentContext nactxCurrent = nsCurrent.getAgentContext();
Database ndbCurrent = nactxCurrent.getCurrentDatabase();
PrintWriter pwHTML=getAgentOutput();
pwHTML.println("Content-Type: text/html");
pwHTML.println("Pragma: No-cache");
pwHTML.println("Expires: 0");
View nvwMenu;
Document ndocMenu;
String strHTML;
nvwMenu=ndbCurrent.getView("vwMenu");
strHTML="Dynamic Menu ";
strHTML=strHTML + "";
strHTML=strHTML +"";
ndocMenu=nvwMenu.getFirstDocument();
while(ndocMenu != null){
strHTML=strHTML +""+ ndocMenu.getItemValueString("tDescription") +" ";
ndocMenu=nvwMenu.getNextDocument(ndocMenu);
}
strHTML=strHTML+"
";
pwHTML.println(strHTML);
} catch(Exception e) {
e.printStackTrace();
}
}
} // end of agent
I have included the source of the page this agent generates below:
Dynamic Menu
Libertas Technologies, LLC
New Riders Press
Lotus
IBM
This was first published in May 2002