/** * A very custom way to filter the items. The AuditUserLoginFilter acts as a command for the * Hibernate criteria object. Take the Limit information and filter the rows. * * @param limit The Limit to use. */ protected ListSubjectFilter getListSubjectFilter(Limit limit) { ListSubjectFilter listSubjectFilter = new ListSubjectFilter(getDateFormat()); FilterSet filterSet = limit.getFilterSet(); Collection<Filter> filters = filterSet.getFilters(); for (Filter filter : filters) { String property = filter.getProperty(); String value = filter.getValue(); listSubjectFilter.addFilter(property, value); } return listSubjectFilter; }
@Override public String execute() throws Exception { String tblid = "etairportTbl"; TableFacade tableFacade = new TableFacadeImpl(tblid, request); tableFacade.setStateAttr("restore"); tableFacade.setEditable(false); tableFacade.setMaxRows(10); // tableFacade.setTotalRows(etairports.size()); tableFacade.setMaxRowsIncrements(10, 20, 50); Limit limit = tableFacade.getLimit(); RowSelect rowSelect = limit.getRowSelect(); FilterSet filterSet = limit.getFilterSet(); Collection<Filter> filters = filterSet.getFilters(); // tableFacade.setItems(etairports); request.setAttribute("traveler_tbl", ""); // buildTable(tableFacade) return SUCCESS; }