HttpSession session = request.getSession(true);
UserObject user = (UserObject)session.getAttribute("userobject"); //get the user object
int individualId = user.getIndividualID();
ListPreference listPreference = user.getListPreference("SecurityProfile");
ValueListParameters listParameters = ActionUtil.valueListParametersSetUp(listPreference, request, ValueListConstants.SECURITY_PROFILE_LIST_TYPE, ValueListConstants.securityProfileListViewMap, true);
ValueList valueList = null;
try {
valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
} catch (Exception e) {
logger.error("[execute] Exception thrown.", e);
throw new ServletException(e);
}
ValueListVO listObject = valueList.getValueList(individualId, listParameters);
ArrayList buttonList = new ArrayList();
buttonList.add(new Button("New", "newUser", "c_goTo('/administration/new_security_profile.do');", false));
buttonList.add(new Button("Delete", "delete", "vl_deleteList();", false));
ValueListDisplay displayParameters = new ValueListDisplay(buttonList, true, false, true, true, true, true);
listObject.setDisplay(displayParameters);