List of usage examples for org.apache.commons.collections.iterators ArrayIterator setArray
public void setArray(final Object array)
From source file:org.jresearch.gossip.actions.admin.log.BrowseLogAction.java
protected ActionForward process(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws JGossipException { ForumDAO dao = ForumDAO.getInstance(); HttpSession session = request.getSession(); ListForm lForm = (ListForm) form;// w w w . j av a 2 s . co m try { RecordsData records = new RecordsData(); User user = (User) session.getAttribute(IConst.SESSION.USER_KEY); records.setBlockSize((null != user) ? user.getSettings().getMes_per_page() : 25); if (session.getAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG) == null) { session.setAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG, new LogSearchCriteria()); } LogSearchCriteria criteria = (LogSearchCriteria) session .getAttribute(IConst.SESSION.SEARCH_CRITERIA_LOG); int block = Integer.parseInt(lForm.getBlock()); dao.fillLogEntryList(criteria, records, block); request.setAttribute(IConst.REQUEST.RECORDS_DATA, records); ArrayIterator it = new ArrayIterator(); it.setArray(JGossipLog.PRIORITIES); request.setAttribute("log_level", it); } catch (SQLException sqle) { getServlet().log("Connection.process", sqle); throw new SystemException(sqle); } catch (InstantiationException e) { throw new SystemException(e); } catch (IllegalAccessException e) { throw new SystemException(e); } catch (InvocationTargetException e) { throw new SystemException(e); } catch (NoSuchMethodException e) { throw new SystemException(e); } return (mapping.findForward(IConst.TOKEN.PAGE)); }