Hi, To my understanding there are 2 different ways to sorting rich:extendedDataTable: a) implements Modifiable and b) use sortOrder/sortPriority.
I would like to use the second method because modify method of Modifiable is called too many times (ajaxSingle and limitToList did not help very much). And each time we have to call areSortFieldsEqual(List<SortField2> sortFields) to compare sortFields. Using the second method I can avoid it by binding sortOrder to an instance of
class SortOrderMap<String, SortOrder> extends HashMap<String, SortOrder> { @Override public SortOrder put(String key, SortOrder value) { cachedItems = null; cachedRange = null; return super.put(key, value); } }
Hi ZJ,
Please take a look at this demo: http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?tab=modifiableDataModel&cid=638675.