Examples: Columns property (View - Java™)
This agent prints the title of each column in a view.
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();
View view = db.getView("By Category");
Vector columns = view.getColumns();
for (int i=0; i<columns.size(); i++) {
ViewColumn column = (ViewColumn)columns.elementAt(i);
if (column.getTitle().equals(""))
System.out.println("No title");
else
System.out.println(column.getTitle()); }
} catch(Exception e) {
e.printStackTrace();
}
}
}