Hi, you are correct, I don't do client/server pagination. I did not want to do this. It adds another layer of complexity that I didn't want. I happen to know that my app will only return results in the hundreds to lower thousands range, and I found a perfect match between this and the PagingScrollTable loading it all in memory. If you try the live demo -- even 10,000 rows loads fast (~1.5 s). Increase it ten-fold though, and that's where the breaking point seems to be. I'm fairly certain that this application won't ever need client/server pagination, but if some day it does -- it isn't a huge tear up. It is a simple design tradeoff -- following the YAGNI principle here.
It just so happened that my GWT-RPC service returned an ArrayList<Model> -- so, that ended up being the public input to this widget. But, as you saw, I throw it away and index it by id in the map. You don't have to do this, obviously. It provides an easy way for me to retrieve the original object. I did not try pagingScrollTable.geRowValue(rowIdx); -- why? probably b/c I didn't see the API. Maybe it works, and the map is unnecessary. I'll try it out later -- thanks for pointing it out! Regards, Davis On Tue, Nov 17, 2009 at 7:17 PM, Yozons Support on Gmail <yoz...@gmail.com>wrote: > I think the example you have also loads all rows and doesn't use "page > fetching" to load only the first page, waiting until they click next page to > actually retrieve additional rows. It seems the example gets all rows, so > the sorting is all local and works on all data, no additional fetching takes > place. > > Also, I noted in your onRowSelection() callback, you use: > > int rowIdx = set.iterator().next().getRowIndex(); > String id = > pagingScrollTable.getDataTable().getHTML(rowIdx, 0); > Message m = tableModel.getMessageById(Long.parseLong(id)); > > I wondered why you took your ArrayList and then created the HashMap based > on ID, and it seems use use this scheme to get the selected row object. But > couldn't you just use the paging scroll table's method to get the selected > object directly: > > int rowIdx = set.iterator().next().getRowIndex(); > Message m = pagingScrollTable.geRowValue(rowIdx); > > Or is there some other reason for your retrieval method? Thanks again for > your code example. I'm still working through and have basic table > functionality working now myself. > > -- > 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-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=. > -- Zeno Consulting, Inc. home: http://www.zenoconsulting.biz blog: http://zenoconsulting.wikidot.com p: 248.894.4922 f: 313.884.2977 -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.