UiBinder and SplitLayoutPanel not displaying
I'm having some trouble getting a SplitLayoutPanel to display using UiBinder. It seems like the SplitLayoutPanel is hidden when the page loads. Thanks
Here's my code:
<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">
<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
xmlns:g="urn:import:com.google.gwt.user.client.ui"
xmlns:z="urn:import:com.zimfly.filebox.client"
>
<ui:style>
.mainPanel {
background-image: url("images/bg.jpg");
background-repeat:repeat-x;
}
</ui:style>
<g:ScrollPanel styleName="{style.mainPanel}">
<g:HTMLPanel>
<br></br>
<g:VerticalPanel>
<g:HorizontalPanel>
<g:HTML> </g:HTML>
<g:Button ui:field="btnToggleUpload">Show Upload Form</g:Button>
<g:HTML> </g:HTML>
<g:Button ui:field='btnNewFolder'>New Folder</g:Button>
</g:HorizontalPanel>
</g:VerticalPanel>
<br></br>
<g:SplitLayoutPanel>
<g:west size="300" unit='EM'>
<z:FilesTree ui:field="filesTree" />
开发者_如何学运维 </g:west>
<g:center>
<z:FilesGrid ui:field="filesGrid" />
</g:center>
</g:SplitLayoutPanel>
</g:HTMLPanel>
</g:ScrollPanel>
</ui:UiBinder>
First, check that the DOCTYPE
declaration on your host page instructs the browsers to use standards mode.
EDIT: looks like the SplitLayoutPanel in your case needs a defined height
value.
<!DOCTYPE html>
精彩评论