UiBinder和SplitLayoutPanel无法显示

时间:2010-08-11 23:43:06

标签: java gwt

我在使用UiBinder显示SplitLayoutPanel时遇到了一些麻烦。看起来在页面加载时隐藏了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>&nbsp;&nbsp;</g:HTML>
                                    <g:Button ui:field="btnToggleUpload">Show Upload Form</g:Button>
                                    <g:HTML>&nbsp;&nbsp;</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>

1 个答案:

答案 0 :(得分:1)

首先,检查主机页面上的DOCTYPE声明是否指示浏览器使用standards mode

编辑:看起来您案例中的SplitLayoutPanel需要定义的height值。

<!DOCTYPE html>