I've coded many different versions of gwt dynamic grids over the years ( Kiyaa templates , FlexTable, CellTable , UIB Row templates w' floating divs..) however none appear to be the perfect solution for most of the tabular data layouts in our app ( tables that don't neccessarily require the performance gain of Celltable and whose markup needs to be exposed to the designer as must as possible).
My latest incarnation:
TheUib.ui.xml:
<table >
<colgroup> <col width="40%"/> <col width="60%"/></colgroup>
<thead> <tr> <th> Col1 </th><th> Col2 </th></tr> </thead>
<tbody id="theTbody"></tbody>
</table>
TheUib.java:
.....Element el = Document.get().getElementById("theTbody");
HTMLPanel theTbodyPanel = HTMLPanel.wrap(el);
TheUibRowUIB row = null;
for ( TheDTO model: dtos) {
row = new TheUibRowUIB();
row.loadData(model);
theTbodyPanel.add(row);
}
Problem:
The above code throws and exception of in the HTMLPanel wrap method because it does not allow "A widget that has an existing parent widget may not be added to the detach list"
I could try to 'attach' by another means but I'm under the impression that doing so will result in a memory leak.
Does anyone have a solution for this problem?
Thanks
David