import lotus.domino.*;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext =
session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
DocumentCollection dc = db.getAllDocuments();
Document doc = dc.getFirstDocument();
if (doc != null) {
Item item = doc.getFirstItem("textListItem");
item.appendToTextList("Motorcycle");
item.appendToTextList("Airplane");
doc.save();
}
} catch(Exception e) {
e.printStackTrace();
}
}
}
import lotus.domino.*;
import java.util.Vector;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext =
session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
DocumentCollection dc = db.getAllDocuments();
Document doc = dc.getFirstDocument();
if (doc != null) {
Item item = doc.getFirstItem("textListItem");
Vector v = new Vector();
v.addElement("Motorcycle");
v.addElement("Airplane");
item.appendToTextList(v);
doc.save();
}
} catch(Exception e) {
e.printStackTrace();
}
}
}