Examples: IsSortDescending property
This agent toggles whether the first column is sorted in ascending or descending order.
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("All Documents");
ViewColumn vc = view.getColumn(1);
if (!vc.isSorted())
vc.setSorted(true);
vc.setSortDescending(!vc.isSortDescending());
System.out.println("IsSortDescending = " + vc.isSortDescending());
} catch(Exception e) {
e.printStackTrace();
}
}
}