在Test.ui.xml
<g:DialogBox ui:field="wishlistDialogBox" autoHide="true">
<g:caption>Test</g:caption>
<g:HTMLPanel> some widgets..</g:HTMLPanel>
</g:DialogBox>
运行后,应用程序仍然显示DialogBox
,所以我尝试为“wishlistDialogBox”设置隐藏,TestView.java
但它没有工作。
@UiField DialogBox wishlistDialogBox;
@Inject
public TestView(final Binder binder) {
widget = binder.createAndBindUi(this);
wishlistDialogBox.hide();
}
然后我为它设置了隐藏,TestPresenter.java
但它仍然没有工作
@Override
protected void onBind() {
super.onBind();
getView().getWishlistDialogBox().hide();
}
怎么回事,古德尔根本没有解释。
另外,如何复用DialogBox
?