The topic is quite old but still maybe it helps someone.
You can use Column#setDataStoreName(String);
Then you can receive it with CellTable#getColumnSortList().get(0).getColumn().getDataStoreName(); in your AsyncDataProvider.
.get(0) is always the column you sorting on.
Cheers
Alex
On Wednesday, March 16, 2011 2:21:26 AM UTC+10, Stephan T wrote:
I'm trying to implement server side sorting using CellTable and
AsyncDataProvider in GWT 2.2. I've followed the example in the
documentation and have everything working with the AsyncDataProvider
only fetching ten objects at a time. But when it comes to sorting I
can't make it work.
I can't figure out how to tell the server on which of the objects
attributes to sort the query result. In the onRangeChanged-method I
can get the ColumnSortList and then get the columns. But the column
object does not contain information like the columns headerString.
If I could get the columns headerString I could figure out which
attribute of the object to do the sorting on, but I can't and now I'm
out of ideas.
I could of course subclass the column-object and add some kind of
identifier-method to it, but I have a feeling that it's something I've
missed because it shouldn't be that tedious.
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment