tags:

views:

270

answers:

1

Hello,

In GWT if I do RootPanel.get("someDiv").add(myPanel); I invariably get: <div id="someDiv"><div></div></div>

But, I just want 1 level of hierarchy, i.e., <div id="someDiv"><div> where the someDiv contains myPanel.

Any ideas? Thanks!

+2  A: 

A Panel has to be a div (or table or span). Your RootPanel is a div, and the Panel you add to it is a div.

If you're writing a full-page app, RootPanel.get() returns the element, so adding a div to that will only result in one div inside the

But honestly, trying to get rid of one nesting of divs in your application is not going to save you any noticeable amount of time.

Jason Hall
No, but it might make the job easier for screen readers, etc.
Igor Klimer