Thursday, November 29, 2012

Re: CellTable - how to avoid unnecessary onRangeChange events?

Hi Rafael,

thank you for offering me your solution.
But in the meantime I found a very simple solution:

The application has to set the new range *before* a call to updateRowCount is made!

The first thing I do right after the data source (chat room) changed is to load the new row count.
But *before* passing this new row count to the data provider (which would trigger an onRangeChange event then), I set the range myself to a valid interval.
Finally, *after* this, I call updateRowCount.


void onSelectChatRoom:()
 loadNewRowCount ();

void onLoadNewRowCount (int cnt)
 Range r = getLastPageRangeForCurrentRoom(cnt);
 tbl.setVisibleRangeAndClearData (r,true); // triggers one onRangeChange event

 pvd.updateRowCount (cnt); // does not trigger a second onRangeChange event anymore!


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