HttpSession session = request.getSession(true);
UserObject userObject = (UserObject)session.getAttribute("userobject");
// Just set up an empty list with the right columns
ListPreference listPreference = userObject.getListPreference("Individual");
ListView view = listPreference.getListView(String.valueOf(listPreference.getDefaultView()));
ValueListParameters listParameters = new ValueListParameters(ValueListConstants.INDIVIDUAL_LIST_TYPE, listPreference.getRecordsPerPage(), 1);
FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.groupViewMap.get(listPreference.getSortElement());
listParameters.setSortColumn(sortField.getQueryIndex());
if (listPreference.getsortOrder()) {
listParameters.setSortDirection("ASC");
} else {
listParameters.setSortDirection("DESC");
}
Vector viewColumns = view.getColumns();
ArrayList columns = new ArrayList();
ActionUtil.mapOldView(columns, viewColumns, ValueListConstants.INDIVIDUAL_LIST_TYPE);
listParameters.setColumns(columns);
listParameters.setTotalRecords(0);
ValueListVO listObject = new ValueListVO(new ArrayList(), listParameters);
ArrayList buttonList = new ArrayList();
buttonList.add(new Button("Add Members", "button3", "saveToAddMembers();", false));
buttonList.add(new Button("Delete", "delete", "javascript:null(0);", false));
ValueListDisplay displayParameters = new ValueListDisplay(buttonList, true, true);