@Override public void setSort(SortParam<Object> param) { super.setSort(param); Collections.sort(rules, super.getComparator(param)); }
@Override public void setSort(SortParam<Object> param) { super.setSort(param); // enable in-memory sorting Collections.sort(rules, super.getComparator(param)); }
@Override public void setSort(Object property, SortOrder order) { super.setSort(property, order); Collections.sort( rules, super.getComparator(new SortParam<>(property, order == SortOrder.ASCENDING))); }
/** * Sets back to the first page, clears the selection and */ public void reset() { dataView.setCurrentPage(0); clearSelection(); dataProvider.setSort(null); }
/** Sets back to the first page, clears the selection and */ public void reset() { dataView.setCurrentPage(0); clearSelection(); dataProvider.setSort(null); }
@Override public void onClick(AjaxRequestTarget target) { SortParam currSort = dataProvider.getSort(); Property<T> property = (Property<T>) getModelObject(); if (currSort == null || !property.getName().equals(currSort.getProperty())) { dataProvider.setSort(new SortParam(property.getName(), true)); } else { dataProvider .setSort(new SortParam(property.getName(), !currSort.isAscending())); } setSelection(false); target.addComponent(listContainer); }
@Override public void onClick(AjaxRequestTarget target) { SortParam<?> currSort = dataProvider.getSort(); @SuppressWarnings("unchecked") Property<T> property = (Property<T>) getModelObject(); if (currSort == null || !property.getName().equals(currSort.getProperty())) { dataProvider.setSort(new SortParam<Object>(property.getName(), true)); } else { dataProvider.setSort( new SortParam<Object>(property.getName(), !currSort.isAscending())); } setSelection(false); target.add(listContainer); } };