@Override protected Object formBackingObject(HttpServletRequest request) throws Exception { Object object = super.formBackingObject(request); SearchFilter searchFilter = (SearchFilter) object; searchFilter.setOrderByColumnId(ReportSearchColumn.START_TIME); searchFilter.setOrderDirection(-1); searchFilter.setPageLimit(4); return object; }
@SuppressWarnings({"unchecked", "rawtypes"}) @Override protected Map referenceData(HttpServletRequest request, Object command, Errors errors) throws Exception { SearchFilter filter = (SearchFilter) command; filter.setColumnList(columnFactory.getColumnList()); TestRunSearchResult searchResult = testRunDAO.browseRuns(filter); searchResult.handleTheList(); searchResult.setColumns(columnFactory.getColumnList()); searchResult.setPage(filter.getPageOffset()); if (filter.getPageLimit() >= 0 && filter.getPageLimit() < filter.getPageLimitArray().length) { searchResult.setDisplayRows(filter.getPageLimitArray()[filter.getPageLimit()]); } else searchResult.setDisplayRows(filter.getPageLimitArray()[0]); Map referenceData = new HashMap(); referenceData.put("searchResult", searchResult); return referenceData; }