Thursday, May 29, 2014

DockLayoutPanel displays in body, not in div

I have a GWT UI with a DockLayoutPanel as the root widget.  When I use RootLayoutPanel.get() to add it to my HTML page like this:

    RootLayoutPanel.get().addStyleName("root-layout-panel");
    RootLayoutPanel.get().add(dockLayoutPanel_);

it displays fine.

When I try to put it in a div like this:

    RootPanel.get("ui").add(dockLayoutPanel_);

Nothing displays and I get this error in Safari:  TypeError: 'undefined' is not an object (evaluating 'c.gwtOnLoad')

Interestingly, I have another app that has a VerticalPanel as its root and I'm able to add that to a div without a problem.  Is there something odd about DocLayoutPanel that I'm missing?

Thanks,

Patrick

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment