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 views = db.getViews();
for (int i=0; i<views.size(); i++) {
View view = (View)views.elementAt(i);
if (view.isDefaultView()) {
System.out.println
("The default view is ¥"" +
view.getName() + "¥"");
break; } }
} catch(Exception e) {
e.printStackTrace();
}
}
}
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 = null;
view = db.getView("All Documents");
view.setDefaultView(!view.isDefaultView());
System.out.println(
"IsDefaultView = " + view.isDefaultView());
} catch(Exception e) {
e.printStackTrace();
}
}
}