Grids with a million rows

18 views
Skip to first unread message

Reinier Zwitserloot

unread,
Mar 25, 2007, 12:20:22 AM3/25/07
to Google Web Toolkit
I've mentioned a dynamically constructed grid with a million rows
before, and I've added it to the demo I showed earlier (with the
scriptaculous-like effects). I've also added a fade effect, a custom
built nice looking checkbox (because the browser's own version has
unknowable size, they are an extreme pain in the tusch in grids; for
example, a grid row is usually small, e.g. 15 pixels, but a mac os x
widget set checkbox is 18 by 18. Whoops - now it looks like crap! -
the CheckBox in my toolkit is guaranteed 13x13, which allows you to
use it in places where you have very tight and specific size
requirements), a closebutton for wizards and the like, and a waiting
animation because you need to use those a lot in a usual GWT app. They
even make a waiting cursor show up.

But, really, the biggest update is the dynamic grid with a million
rows. Open the wizard to see it.

There are lots of little browser bugs: In opera, scrolling with the
wheel doesn't work, but the other 2 scroll options (dragging the bar
or hitting the bar's arrows) do, and the flash/morph effects don't
originate from the right places. In Firefox, dragging the scrollbar
freezes out all updates until you let go (that's not how it's supposed
to work). In safari it works perfectly, and I haven't tested MSIE6
yet.

My old version of the dyngrid handles all browsers correctly but it
wasn't all that intelligent about what to update and how to do it.
This newer version does things in, as far as I know, the most
efficient way possible. Its responsiveness in all browsers compared to
the older version has improved to the point that it's virtually
indistinguishable from a fully rendered table.

Note that this example doesn't include dynamically fetching content
from the server, but it's not that difficult to implement this. There
are also sortable columns, which I have yet to port over form the old
to the new model. All these things will be forthcoming soon, but for
now - voila. I've received multiple emails about the implementation of
this grid thing, so here it is!

check here: http://www.zwitserloot.com/tipit-gwtlib/example/

Robert Morton

unread,
Mar 25, 2007, 9:09:31 PM3/25/07
to Google Web Toolkit
Wow, nice work!
-Robert

Reinier Zwitserloot

unread,
Mar 26, 2007, 12:48:54 AM3/26/07
to Google Web Toolkit
I just had me a serious tussle with Opera and Firefox, and implemented
some fixes.

Opera/Mac and FireFox/mac will never get this entirely right; their
onScroll functionality is just plain broken and buggy. Fortunately the
windows versions of Opera and FF do get this right, as does MSIE
(phew! That's always a wing and a prayer), and Safari.

A bug in Opera was also making the flash and morph effects fail on
inline rendered elements. I've submitted a workaround patch to GWT-
contrib, and the library itself uses this patch until it makes it into
GWT (hopefully I submitted in time for 1.4!)

I've also done prelimary work on making FireBug's logging features
available in GWT, and escaping to System.out in hosted mode, and
firebug lite (automatically loaded on the fly, so as not to
contaminate the main GWT generated js with bloat, as I assume the
logging will be left off in production 99% of the time) when firebug
is not available. The only missing piece is that firebug 'logs' the
caller, which in this case is always the GWT wrapper method. I've
submitted a request @ firebug for a workaround.

the demo and source has been updated:

http://www.zwitserloot.com/tipit-gwtlib/example/

Reply all
Reply to author
Forward
0 new messages