Hi Pohl,
Thanks for the idea. I figured there could be a way around it maybe,
but from what I read about the gen2 PagingScrollTable from the
incubator's synopsis, it seemed like they mentioned the sorting can be
done locally as well, which makes me think that there might be a more
straight forward way of doing this? I was hoping to see if anyone was
aware of that. This idea does sound like a likely alternative though.
I'll wait a little longer before I finally make a decision. If i do
come to know of anything I'll post it here as well to keep you and
others informed.

Thanks again.
Suri

On Dec 4, 9:31 pm, pohl <[EMAIL PROTECTED]> wrote:
> On Dec 4, 8:13 pm, Suri <[EMAIL PROTECTED]> wrote:
>
> > Hi all,
> > I'm trying to figure out how you can sort locally using the
> > PagingScroll table. Not sure what the syntax is so any help is
> > appreciated. Thanks
>
> > Suri
>
> I've just started using the PagingScrollTable myself, but I think I
> can point you in the right direction.
>
> There is a TableModel that you need to define in order to get the
> PagingScrollTable to work at all. This class defines one method that
> you need to implement:
>
>         public void requestRows(Request request, Callback<T>
> callback) ;
>
> You probably already know that you can interrogate the Request object
> here to determine the start row and number of rows that you need to
> obtain data for.
>
>     int start = request.getStartRow();
>     int max = request.getNumRows();
>
> You can also interrogate it for some other things, one of them being a
> ColumnSortList object:
>
>             ColumnSortList csList = request.getColumnSortList();
>
> From this object you can get some other things:
>
>             int column = csList.getPrimaryColumn();
>             ColumnSortInfo info = csList.getPrimaryColumnSortInfo()
>             boolean isAscending = csList.isPrimaryAscending();
>
> Now you said you wanted to sort on the client side, so I assume you've
> got a Collection of objects and some Comparators.  I would guess that
> You could use the above to determine which Comparator to use.    Then
> you would sort the collection and and return the range of items from
> start to start+max.
>
> I haven't done this myself yet, so read my advice with a skeptical
> eye.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to