Examples: Views property (Database - Java™)
This agent displays the names of all the views and folders 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();
String title = db.getTitle();
Vector views = db.getViews();
int size = views.size();
System.out.println("Database \"" + title +
"\" has " + size + " views");
for (int i = 0; i<size; i++) {
String name =
((View)views.elementAt(i)).getName();
System.out.println
("View #" + (i+1) + ": " + name); }
} catch(Exception e) {
e.printStackTrace();
}
}
}