poptanimukesh / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
0 stars 0 forks source link

Cannot get PagingScrollTable to sort columns #314

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What version of gwt and gwt-incubator are you using?

gwt 1.7.0
gwt-incubator svn head from july 14, 2009

What OS and browser are you using?

WinXP, browser: hosted, IE 8, Firefox 3.5

Do you see this error in hosted mode, web mode, or both?

both

(If possible, please include a test case that shows the problem)

Hopefully using the test case you have generously provided, what steps will
reproduce the problem? 
1. Code included as attachment with onModuleLoad() demonstrates this
2.
3.

What is the expected output? What do you see instead?

It may very well be that I'm just not using the API correctly here, but I
can't seem to resolve this.  I set up a simple PagingScrolltTable with a
TableModel and a simple model object with a String firstName (column 0),
and a String lastName (column 1).  I populate the table and try to sort it
programattically.  It does not sort.  I also try clicking on the headers
and the sort arrow shows up but no sort.  I step into the debugger, and in
SortableGrid.java at this line (325):

   // Use the onSort method to actually sort the column
    Element[] selectedRows = getSelectedRowsMap().values().toArray(
        new Element[0]);

...always returns an empty array, which causes the sorting to not happen.

Workaround if you have one: none that I know.

Please provide any additional information below,  and thank you for taking
the time and effort to report this issue, as good issue reports are
critical for our quest to make GWT's new widgets and libraries shine.

Original issue reported on code.google.com by davisf...@gmail.com on 8 Oct 2009 at 6:30

Attachments:

GoogleCodeExporter commented 8 years ago
Hi there,
PagingScrollbaleTable is not supposed to use the Default Sorter; on the 
requestRows method, the column name is passed to the server through the request 
so that yoiu do your own server side sorting.
Never the less, you still can re-activate the default sorter (html cell content 
based) by setting:
pagingScrollTable.getDataTable().setColumnSorter(null);
Just after initializing the pagingScrollTable.

Original comment by mardig...@gmail.com on 3 Aug 2010 at 1:24