use of org.openntf.domino.design.DesignColumn in project org.openntf.domino by OpenNTF.
the class Engage17DesignView method run.
@Override
public void run() {
Session sess = Factory.getSession(SessionType.NATIVE);
Database extLib = sess.getDatabase("oda_1.nsf");
View contacts = extLib.getView("AllContactsProgrammatic");
if (null != contacts) {
contacts.remove();
}
DatabaseDesign dbDesign = extLib.getDesign();
DesignView newView = dbDesign.createView();
newView.setSelectionFormula("SELECT Form=\"Contact\"");
newView.setName("AllContactsProgrammatic");
DesignColumn col = newView.addColumn();
col.setItemName("State");
col.setSortOrder(SortOrder.ASCENDING);
col.setTitle("STATE");
col.setCategorized(true);
DesignColumn name = newView.addColumn();
name.setFormula("FirstName+\" \"+LastName");
name.setSortOrder(SortOrder.ASCENDING);
name.setTitle("NAME");
DesignColumn name2 = newView.addColumn();
name2.setFormula("LastName");
name2.setSortOrder(SortOrder.ASCENDING);
name2.setTitle("NAME");
DesignColumn city = newView.addColumn();
city.setItemName("City");
city.setTitle("CITY");
city.setResortOrder(ResortOrder.ASCENDING);
city.setSecondarySortColumn(2);
newView.save();
}
Aggregations