Thursday, November 29, 2012

Re: CellTable - how to avoid unnecessary onRangeChange events?

Magnus, Hi.

I didn't found an easy and simple solution for that.

In my application I wrote a "DataManager" which is an AsyncDataProvider and has some cache functionality. So when I get an onRangeChange event I just go to server when it's really needed, fetching only the missing range.

It do a lot of things, but only this class for me is getting 800 lines :( Of course, this cache functionality is smaller than this, but still complex.

I haven't tested yet the performance of my code.

I could share something with you, if you are interested in. 

Em quarta-feira, 28 de novembro de 2012 12h43min24s UTC-3, Magnus escreveu:

I found that my CellTable sends unnecessary onRangeChange events in a specific situation:

- The data source changes, e. g. the user selects another chat room.
- The new row count is less than the old one.

Then, when calling the data provider's updateRowCount method the GWT code recognizes that the current range exceeds the row count and corrects the range somhow, triggering an onRangeChange event.
Independend of this, the application also as an idea which records to show and also sets the new range.

In the end, the page is loaded twice. Can we avoid this?


You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

No comments:

Post a Comment