Tuesday, May 26, 2009

GWT FlexTable bug

Just faced a complex and really bad bug with GWT's FlexTable.

It tends to forget about the cells removed! So, if I remove some cells, and then add some more, the old ones randomly appear.

Problem is that I was developing really complex layout with dynamic cell manipulation and hard use of rowspan/colspan. And spent 4 hrs fixing algorithm :( :( :(..

Technical details
  • Methods FlexTable::clearRow() and FlexTable::clearCell() seem to be broken (at least in GWT 1.5). They do their job, but sometimes deleted cells reappear in table. That's frustrating.
  • This is also stated on the Google code tracker : Issue 1766
  • I avoided this problem by replacing calls to clearRow and clearCell to FlexTable::clear(). Yes, that's a heavy solution - but it did fit for me :)

No comments: