vaadin7 - How to display a modal Window in Vaadin? -


i'm new vaadin , still learning. here trying basic vaadin project compile. want , display modal window when ui runs, having trouble. here have far:

captchaui.java -

import com.vaadin.server.vaadinrequest; import com.vaadin.ui.ui;   public abstract class captchaui extends ui {     /**      *       */     private static final long serialversionuid = 1l;      @override     protected void init(vaadinrequest request) {         addwindow(new captchawindow());      } } 

captchawindow.java -

import com.vaadin.ui.button; import com.vaadin.ui.label; import com.vaadin.ui.verticallayout; import com.vaadin.ui.window;   public class captchawindow extends window {      /**      *       */     private static final long serialversionuid = 1l;      public captchawindow() {      // other ui content     setcontent(new label("here's ui"));      // create sub-window , set content     window subwindow = new window("sub window");     verticallayout subcontent = new verticallayout();     subcontent.setmargin(true);     subwindow.setcontent(subcontent);      // put components in     subcontent.addcomponent(new label("label"));     subcontent.addcomponent(new button("button"));      // center in browser window     subwindow.center();      // open in ui     addwindow(subwindow);      } } 

could give me or recommendation display?

thanks much.

according vaadin docs easy setting

setmodal(true) 

on sub window make modal.

please note modal feature of vaadin client side restriction. modifying html debug tools in browser still make possible click buttons in background.


Comments

Popular posts from this blog

scala - 'wrong top statement declaration' when using slick in IntelliJ -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

PySide and Qt Properties: Connecting signals from Python to QML -