Ahhh... so then at the end to put the sorted list back in the
original and update the table
BOOKS = new ArrayList(thisList);
cellTable.setRowData(BOOKS);
Wow that makes sense. I knew it was something stupid. I understand why
John had this line above now: List newData = new
ArrayList(cellTabl
Well, I'd start out by trying:
public MySortHandler(List BOOKS, CellTable myCellTable,
Column columnA, you get the picture) {
thisList = new ArrayList (BOOKS);
..
}
On Feb 23, 9:56 am, Josh K wrote:
> Ok, I got something working using the example you provided, but I
Ok, I got something working using the example you provided, but I
don't like how I implemented it. It wasn't hard, but everything I've
wanted to do in GWT so far has been easy, so this seems kind of
messy..
But, I guess trying to implement sorting using a ListSortHandler would
have been just as me
What I was getting confused about doing it this way though is if I'm
allowing the data to be sorted by 4 or 5 different columns, would I
have to say something like:
if (event.isSortAscending && nameColumn) {
Collections.sort(newData, nameAscComparator)
} else if (nameColumn) {
Collections.
Here's the question you want to ask yourself: "Why am I using an
AsyncDataProvider and data paging?"
Because I use one in my app with sortable columns. And I'm using one
because I've got thousands to tens of thousands of rows of data to
display. And since I don't want to try to download all that
If you are supporting paging, then a local sort will only sort the current
page, whereas a database sort would sort the data return the results for the
current page. For example, if you are on the first page and do a reverse
sort, do you want to see all the names that start with z (database sort),
I've been developing an application in GWT that has data I've been
displaying in a CellTable. I've set it up with a few TextColumns and a
few EditTextColumns. I've got it set up to where if someone changes
the data in an EditText cell, it sends an asynchronous request to the
database and updates th