简体   繁体   English

包装GWT对话框的页脚

[英]Wrapping GWT DialogBox footer

DialogBox is in fact set of <div> elements. DialogBox实际上是<div>元素的集合。 There is basically TitleBar, MainContent and the Footer. 基本上有TitleBar,MainContent和Footer。 By default adding elements to DialogBox will throw them into main Content. 默认情况下,将元素添加到DialogBox会将它们放入主Content。

What I want is to throw something into footer. 我想要的是在页脚中添加一些内容。 Its basically this div: <div class="dialogBottomCenterInner"> 它基本上是这个div: <div class="dialogBottomCenterInner">

I made this method inside the class that inherits from DialogBox to wrap the footer: 我在从DialogBox继承的类中制作了此方法来包装页脚:

public HTMLPanel getFooter() {
    Element td = getCellElement(2, 1);
    td.setId("footer"); //html at this point = <div class="dialogBottomCenterInner" id="footer"></div>              
    HTMLPanel panel = HTMLPanel.wrap(td);
    return panel;
}

Unfortunatelly it fails at HTMLPanel.wrap(td); 不幸的是,它在HTMLPanel.wrap(td);失败HTMLPanel.wrap(td); with java.lang.AssertionError: null 与java.lang.AssertionError:null

There is no footer in a DialogBox. 对话框中没有页脚。 The element you refer to is a part of a border that surrounds the DialogBox. 您引用的元素是包围DialogBox的边框的一部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM