JAVA/CORBA CLASSES
Examples: getNth method
This agent gets the top-level entry specified by the agent comment.
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();
View view = db.getView("By Category");
ViewNavigator nav = view.createViewNav();
String comment = agentContext.getCurrentAgent().getComment();
if (comment.equals("")) comment = "1";
Integer N = new Integer(comment);
ViewEntry entry = nav.getNth(N.intValue());
if (entry != null) {
System.out.println(entry.getColumnValues().elementAt(0)); }
} catch(Exception e) {
e.printStackTrace();
}
}
}
Véase también
getNth method
Glosario
¿Desea opinar sobre la Ayuda?
Ayuda sobre la Ayuda
Abrir la Ayuda en pantalla completa
Glosario
¿Desea opinar sobre la Ayuda?
Ayuda sobre la Ayuda
Abrir la Ayuda en pantalla completa