Examples: SecondaryResortColumnIndex property (ViewColumn - Java™)
This agent toggles whether a user-sorted column allows a secondary sorting column and identifies the column.
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.isResortAscending() | vc.isResortDescending()) {
if (vc.isSecondaryResort())
vc.setSecondaryResort(false);
else {
vc.setSecondaryResort(true);
vc.setSecondaryResortColumnIndex(4);
}
System.out.println("IsSecondaryResort = " +
vc.isSecondaryResort());
System.out.println("SecondaryResortColumnIndex = " +
vc.getSecondaryResortColumnIndex());
}
else
System.out.println("Not resortable");
} catch(Exception e) {
e.printStackTrace();
}
}
}