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
Post a Comment