...
<g:VerticalPanel styleName="{style.mainVerticalPanel}">
<g:SplitLayoutPanel>
<g:north size="700">
<g:VerticalPanel>
<g:ScrollPanel styleName="{style.conversationPanelContainer}">
<g:FlexTable ui:field="conversationPanel" styleName="{style.conversationPanel}"></g:FlexTable>
</g:ScrollPanel>
<g:HorizontalPanel styleName="{style.messageTextAndSendPanel}">
<g:TextBox ui:field="messageText" styleName="{style.messageText}"></g:TextBox><g:Button ui:field="sendButton">Send</g:Button>
</g:HorizontalPanel>
</g:VerticalPanel>
</g:north>
<g:south size="300">
<g:button>TestButton</g:button>
</g:south>
</g:SplitLayoutPanel>
</g:VerticalPanel>
...
Anything look wrong with this? All I’m trying to do is make a simple split panel but whenever I run this all I get is a blank page. Without any of the SplitPanel stuff, it works fine. The same happens with DockLayoutPanel.
OK, got it working (see older versions of this answer for previous attempts ;)).
My solution is based on Mail example.
The working code:
UiBinder *.ui.xml:
Note a number of things:
<g:Button>, not<g:button>(case sensitive)RootLayoutPanelinstead of the usualRootPanelLayoutPanels thingy – in the Mail example they use aSplitLayoutPanelnested in aDockLayoutPanel, yet only theDockLayoutPanelis explicitly added to theRootLayoutPanel– am I to understand that theSplitLayoutPanelautomagically also gets added (so that it can receive resize events, etc)? How about some other Widgets nested in the main LayoutPanel – do they have to be explicitly added to theRootLayoutPanelor only if they are the root of that Widget/Composite or is that not even possible? I don’t really have time atm to pursue this further – I’ll leave it as a homework for someone else 😉BTW: I’ve checked this code under Quirks mode and Standards mode – I don’t see a difference, both work O_o (though, this is a simple use of the
SplitLayoutPanel– more complex examples will probably result in some weird behavior in Quirks mode and/or rendering errors)