Nesting with SplitLayout and DockLayout panels

89 views
Skip to first unread message

P.G.Taboada

unread,
Dec 7, 2009, 11:48:33 AM12/7/09
to Google Web Toolkit
Hi,

I am using UIBinder with the new *Layout panels and running into some
strange problems when nesting panels.

My main *ui.xml user interface does something like that:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:style>
.full {
width: 100%;
height: 100%;
}
</ui:style>
<g:SplitLayoutPanel >
<g:west size="200" >
<g:ScrollPanel styleName="{style.full}">
<g:Tree ui:field="tree" />
</g:ScrollPanel>
</g:west>
<g:center>
<g:ScrollPanel ui:field="content" styleName="{style.full}" />
</g:center>
</g:SplitLayoutPanel>
</ui:UiBinder>

In my presenter I add a node to the tree. On a selection event I
switch the widget in the content scroll panel. One of the items is a
search panel, defined as:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>

<ui:style>
.full {
width: 100%;
height: 100%;
background-color: black;
}
</ui:style>

<g:DockLayoutPanel unit="EM">
<g:north size="10">
<g:HTMLPanel>
<table>
<tr>
<td>Query: </td>
<td>
<span ui:field="querySpan" />
</td>
</tr>
<tr>
<td>Found: </td>
<td>
<span ui:field="foundSpan"> 0 </span>
items
</td>
</tr>
</table>

</g:HTMLPanel>
</g:north>
<g:south size="10">
<g:SimplePanel ui:field="detailsArea" styleName="{style.full}" />
</g:south>
<g:center>
<g:ScrollPanel styleName="{style.full}">
<g:FlexTable ui:field="resultContent" width="100%" />
</g:ScrollPanel>
</g:center>
</g:DockLayoutPanel>

</ui:UiBinder>


The neither the south nor the center of the search panel is not
showing, the north is. If I go inspect the document I see that one or
two divs have an height of 0px, explaining why the display is
screwed.

What am I missing? What is the best way to wrap a layout panel?
Simplepanel does not seem to do the required magic.

brgds,

P. G. Taboada


P.G.Taboada

unread,
Dec 7, 2009, 12:32:29 PM12/7/09
to Google Web Toolkit
Behaviour is consistent between FF and Safari. I am on a Mac, so I
can't tell for IE.

If I change the nested DockLayoutPanel to something different, let's
say HTMLPanel, it works. Looks ugly but it works.

Bug?
Bad usage?

Help?????

brgds,

Papick

lemaiol

unread,
Dec 7, 2009, 3:13:55 PM12/7/09
to Google Web Toolkit
Mmmmm... I remember having this problem... are u adding the
DockLayoutPanel to the RootLayoutPanel or to the RootPanel. I guess
that the logic required from the new layout panels is only enforced by
the RootLayoutPanel. If it is not that, are you in standards mode?
(using for example '<!doctype html>' in your host html page)

Cheers,
Alberto

P.G.Taboada

unread,
Dec 8, 2009, 5:53:08 PM12/8/09
to Google Web Toolkit
Nope, same problem,

P.G.Taboada

unread,
Dec 9, 2009, 8:51:56 AM12/9/09
to Google Web Toolkit
I created a new thread with project, screenshot and link to a deployed
sample:


http://groups.google.com/group/google-web-toolkit/browse_thread/thread/c39b58f5d1c446f9#

brgds,

Papick

piyush sharma

unread,
Dec 10, 2009, 2:07:39 AM12/10/09
to google-we...@googlegroups.com

--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



Reply all
Reply to author
Forward
0 new messages