Thanks Thomas, I could get the app to use only limited portion of the
body. But how do place the app in a div on my page.
My Page looks like this
<html>
<body>
<div>This Is the Header</div>
<div id="the_body">
<div id="sidebar_links">This is the sidebar</div>
<div id="content">GWT app should appear here</div>
</div>
<div>This Is the Footer</div>
</body>
</html>
Since RootLayoutPanel does not take id as an argument, how can make
GWT place the app in the div with id="content"?
On Feb 22, 3:46 pm, Thomas Broyer <[email protected]> wrote:
> On Feb 20, 3:05 pm, spacejunkie <[email protected]> wrote:
>
>
>
> > Hi,
>
> > I am woring on building a dashboard application. The site uses a
> > layout template and each page has the same header footer etc. Only the
> > content section differs across pages.
> > Following the same convention, I would like to place the app in the
> > content section of the dashboard page.
>
> > I'm using GWT 2.0 and the UIBinder feature to layout the app. I found
> > that the RootLayoutPanel internally uses RootPanel.get() which
> > basically means that it would occupy the whole page. I would like to
> > define a div with some id in HTML and have GWT place the application
> > in that div. The way it works with RootPanel.get("mydiv");
>
> > I tried
>
> > DockLayoutPanel outer = binder.createAndBindUi(this);
> > RootLayoutPanel root = RootLayoutPanel.get();
> > root.add(outer);
>
> > and
>
> > DockLayoutPanel outer = binder.createAndBindUi(this);
> > RootPanel root = RootPanel.get();
> > root.add(outer);
>
> > With the first snippet, the app occupies the whole screen with the
> > second, the app is not visible at all.
>
> > I have done this without UIBidnder but can't figure out how to do it
> > with it.
>
> > Can someone point out how to place a app in a named div while still
> > using UIBinder?
>
> > I am using the sample Mail application as reference and trying to put
> > it in a div so that it occupies only a part of the page and the rest
> > of the page is plain HTML
>
> Your issue is *not* UiBinder here, but the *LayoutPanel's.
>
> As noted in the doc, a LayoutPanel needs to either: be a (direct)
> child or a ProvidesResize container (which is the case of all
> *LayoutPanel's too, including of course RootLayoutPanel) or be given
> an explicit size.
> And RootLayoutPanel, to be able to "ProvidesResize" to its children
> takes the whole window and listens to window resize events.
>
> If you don't want the RootLayoutPanel behavior, then you have to give
> your widget an explicit size (or come up with a solution to
> "ProvidesResize")
--
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.