private static Logger logger = Logger.getLogger(SecurityProfileLookupHandler.class);
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse res) throws IOException, ServletException
{
String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();
ValueListParameters listParameters = null;
if (request.getAttribute("listParameters") != null) {
listParameters = (ValueListParameters)request.getAttribute("listParameters");
} else {
listParameters = new ValueListParameters(ValueListConstants.SECURITY_PROFILE_LIST_TYPE, 100, 1);
// Sorting
FieldDescriptor sortField = (FieldDescriptor)ValueListConstants.securityProfileListViewMap.get("ProfileName");
listParameters.setSortColumn(sortField.getQueryIndex());
listParameters.setSortDirection("ASC");
}
ArrayList columns = new ArrayList();
columns.add(ValueListConstants.securityProfileListViewMap.get("ProfileName"));
listParameters.setColumns(columns);
ValueList valueList = null;
try {
valueList = (ValueList)CVUtility.setupEJB("ValueList", "com.centraview.valuelist.ValueListHome", dataSource);
} catch (Exception e) {
logger.error("[execute] Exception thrown.", e);