PDA

View Full Version : Rendering many tables sequencially



ysbelman
9 Feb 2010, 12:00 PM
Hi,
i have a GWT tree in which i want to display a bunch of GXT grids. The way i want to render it, is by first displaying root's immediate leafs (simple text), and then delay rendering of the grandchildren. Grandchildren are LayoutPanel's.


ContentPanel makeMyGrid(){
ContentPanel cp = new ContentPanel();
cp.setSize(700, store.getCount() * 24 + 24);
Grid<ModelData> grid = new Grid<ModelData>(store, cm);
grid.setAutoWidth(true);
cp.add(grid);
return cp;
}
It works, except that the browser hesitates for some time and then displays all the grandchildren at once, instead of painting each grandchild at a time in a "sequential" manner. This would be more preferable to the user.

In a for..loop to paint these grandchildren i do something like this:


ContentPanel cp = makeMyGrid(a);
child.addItem(cp);
child.setState(true);
cp.layout(true);


any suggestions on how to smooth out this rendering? I may have 100s or 1000 grids on the same page.