How do I render celltable data in chunks?
Hi
I have 100+ rows to render in a celltable. The actual data is
downloaded quite fast via RPC call. However, rendering these 100+ rows
in IE6 is awfully slow. It also causes temporary UI lockups. Is it
possible to render the table in chunks? maybe like 10 rows at a time
incrementally? I tried the following but it doesn't seem to work in
IE6. I still get lockups:
Scheduler.get().scheduleIncremental(new RepeatingCommand() {
int cur = 0;
@Override
public boolean execute() {
int size = data.size();
List<OrderEntry> batch = data.subList(
cur, Math.min(cur+BATCH_SIZE, size));
tableDataProvider.getList().addAll( batch );
tableDataProvider.flush();
cur = cur + BATCH_SIZE;
if (cur >= size-1) {
// force a sort
ColumnSortEvent.fire(table,
table.getColumnSortList());
return false;
} else {
return true;
}
}
});
also, I'm forcing a sort to put the sortable headers in the right
state, even tho data got back from the server is already sorted. is
there a way to avoid it?
thanks
--
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-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home