JAVA/CORBA CLASSES


Examples: IsSubForm property
This agent prints the names of all the subforms in the current database.

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();
     Vector forms = db.getForms();
     boolean gotOne = false;
     System.out.println
     ("Subforms in \"" + db.getTitle() + "\":");
     for (int i=0; i<forms.size(); i++) {
       Form form = (Form)forms.elementAt(i);
       if (form.isSubForm()) {
         System.out.println
         ("  " + form.getName());
         if (!gotOne) gotOne = true; }}
     if (!gotOne)
       System.out.println("  No subforms");
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also