我在使用UiBinder顯示SplitLayoutPanel時遇到了一些麻煩。看起來SplitLayoutPanel在頁面加載時隱藏。由於UiBinder和SplitLayoutPanel不顯示
這裏是我的代碼:
<!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>
我已添加到我的答案中。 – Strelok 2010-08-12 00:27:56
另外,這個問題可能會有所幫助:http://stackoverflow.com/questions/2495457/cant-get-splitlayoutpanel-working-gwt-uibinder-are-driving-me-crazy – 2010-08-12 06:43:53