// Handle Paging, etc
ListPreference listPreference = user.getListPreference("Template");
ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.TEMPLATE_LIST_TYPE, ValueListConstants.templateViewMap, true);
// Get the list from the database.
ValueListHome valueListHome = (ValueListHome) CVUtility.getHomeObject("com.centraview.valuelist.ValueListHome","ValueList");
ValueList valueList = null;
try
{
valueList = valueListHome.create();
} catch (CreateException e) {
logger.error("[execute] Exception thrown.", e);
throw new ServletException(e);
}
valueList.setDataSource(dataSource);
ValueListVO listObject = valueList.getValueList(individualId, listParameters);
// Got the list now set the display preferences on the ValueListDisplay Object.
ArrayList buttonList = new ArrayList();
buttonList.add(new Button("New Template", "newTemplate", "c_goTo('/administration/new_template.do');", false));
buttonList.add(new Button("Delete", "deleteTemplate", "vl_deleteList();", false));
ValueListDisplay displayParameters = new ValueListDisplay(buttonList, true, false, true, true, true, true);