GWT popuPanel.hide() doesnt work -


i have simple view. there uibinder , class themselves:

public class newnotepopuppanel extends composite implements newnoteview { interface newnotepopuppaneluibinder extends uibinder<popuppanel, newnotepopuppanel> { }  private static newnotepopuppaneluibinder ouruibinder = gwt.create(newnotepopuppaneluibinder.class);   @uifield popuppanel popuppanel; @uifield verticalpanel newnotemainpanel; @uifield horizontalpanel newnoteheader; @uifield label storednotetitle; @uifield datelabel notecreateddate; @uifield verticalpanel contentpanel; @uifield textbox currentnotetitle; @uifield richtextarea contenttextarea; @uifield horizontalpanel newnotefooter; @uifield checkbox favorite; @uifield button save; @uifield button close;  private presenter presenter;  static {     resources.instance.style().ensureinjected(); }  public newnotepopuppanel() {     initwidget(ouruibinder.createandbindui(this)); }  @uihandler("favorite") void onfavoritecheckboxclicked(clickevent event) {     if (presenter != null) {         presenter.onfavoritecheckboxclicked();     } }  @uihandler("save") void onapplybuttonclicked(clickevent event) {     if (presenter != null) {         presenter.onapplybuttonclicked();     } }  @uihandler("close") void oncancelbuttonclicked(clickevent event) {     popuppanel.hide(); } } 

uibinder:

<ui:uibinder xmlns:ui='urn:ui:com.google.gwt.uibinder'          xmlns:g='urn:import:com.google.gwt.user.client.ui'> <ui:with field="res" type="ru.beleychev.notes.client.ui.resources"/> <g:popuppanel ui:field="popuppanel" width="600px" modal="true" title="edit note" addstylenames="{res.style.mainpanel}">     <g:verticalpanel ui:field="newnotemainpanel">         <g:horizontalpanel ui:field="newnoteheader">             <g:label ui:field="storednotetitle" addstylenames="{res.style.label}"/>             <g:datelabel ui:field="notecreateddate" customformat="eee, mmm d, yyyy"                          addstylenames="{res.style.label}"/>         </g:horizontalpanel>         <g:verticalpanel ui:field="contentpanel">             <g:textbox ui:field="currentnotetitle" addstylenames="{res.style.searchbox}"/>             <g:richtextarea ui:field="contenttextarea" focus="true"/>         </g:verticalpanel>         <g:horizontalpanel ui:field="newnotefooter">             <g:checkbox ui:field="favorite"/>             <g:button ui:field="save" text="save" addstylenames="{res.style.button}"/>             <g:button ui:field="close" text="close" addstylenames="{res.style.button}"/>         </g:horizontalpanel>     </g:verticalpanel> </g:popuppanel> 

this popup window opens view. , there ok. have no problems interface. but, unfortunately, "close" button doesn't close popup. it's simple (easy-peasy). problem? ) looking forward suggestions, guys. thank in advance.

from why can't hide dialogbox in uibinder in gwt?

dialogbox (and popuppanels in general) not work other widget when speaking adding them dom. should never attach them directly (i.e., panel.add(yourdialogbox) or inside uibinder xml file) did. instead should create them, , call hide()/show(), , methods, displayed/hidden (i.e., attached/detached @ end of/from dom)


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -