Reputation: 14863
how can I add a Element
to the RootPanel
? Is creating a HTML
element from the Elements.toString() method really the only way?
Import names:
Element (com.google.gwt.dom.client.Element)
RootPanel (com.google.gwt.user.client.ui.RootPanel)
HTML (com.google.gwt.user.client.ui.HTML)
Regards, Stefan
Upvotes: 1
Views: 1132
Reputation: 64541
Don't use widgets when what you want are elements.
Document.get().getBody().appendChild(element);
or
Document.get().getElementById("foo").appendChild(element);
Upvotes: 5