It does not generate any error. addCell(String text) just do nothing.
Problem appears when extending SimpleTable class. If call addCell
method in SimpleTable constructor all works fine:
public class SimpleTable extends Widget {
private Element tr;
public SimpleTable() {
Element tableElem = DOM.createTable();
Element bodyElem = DOM.createTBody();
DOM.appendChild(tableElem, bodyElem);
setElement(tableElem);
tr = DOM.createTR();
DOM.appendChild(bodyElem, tr);
addCell("text 1"); // difference from previous code! Works!
}
public void addCell(String text) {
Element td = DOM.createTD();
td.setInnerText(text);
DOM.appendChild(tr, td);
}
}
But why it does not work in extended class I do not understand...
On Dec 14, 5:13 pm, Ed <[email protected]> wrote:
> Hard to tell as you code seems ok but you don't give any error details.
> Try to debug it and have a look at HorizontalPanel and VerticalPanel as
> they perform the same kind of actions and that works...
> I also do some table building myself like you are doing and works fine..
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.