// add to your ModalWindow constructor:
setWidthUnit("em");
setHeightUnit("em");
setResizable(false);
setOutputMarkupId(true);

@Override
public void show(AjaxRequestTarget target) {
    super.show(target);
    // ...
    int width = ...;
    int height = ...;
    target.appendJavascript(""//
            + "var thisWindow = Wicket.Window.get();\n"//
            + "if (thisWindow) {\n"//
            + "thisWindow.window.style.width = \"" + width + "em\";\n"//
            + "thisWindow.content.style.height = \"" + height + "em\";\n"//
            + "thisWindow.center();\n"//
            + "}"//
    );
}

Reply via email to