Tuesday, May 24, 2011

How to force sort on CellTable with new Data or data updated

I Define a Celltable with sort on various columns.
- With a sorthandler eg. sortHandler = new ListHandler<T>(dataList);
- With specified sorted columns, eg. column.setSortable(true);
- With associated comporator eg. sortHandler.setComparator(column,
comparator);
- With a default sort order, eg.
cellTable.getColumnSortList().push(cDate);

This is ok but when I add new rows or reload a new data list the
current sorting doesnt apply automaticaly. If the user change the
default sort (eg. date) used by my reload method, current displayed
rows are not sorted according the current celltable selected columns.

I don't want to develop my own sort but look for a method like
sortHandler.refresh() to automaticaly apply the current data list
using current columns sort list. I understand an automatic sort is not
a good idea (if you update the column value used in current sort do
you expect your row to disappear with new sort) but may be a on demand
method is usefull rahter than using/firing ColumnSortEvent and such
"internal" event/classes directly ?

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate