THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
Adding scrollbars to a modal window
In your WebPage:
... add(new BookmarkablePageLink("myLink", MyPopupPage.class, params).setPopupSettings(PopupSettings.SCROLLBARS)); ...
Refreshing page when a modal window is closed
In your WebPage:
modalWindow.setWindowClosedCallback(new WindowClosedCallback(){ private static final long serialVersionUID = 1L; @Override public void onClose(AjaxRequestTarget target){ target.addComponent(parentPage); } });
An alternative approach would be to do it on the client side:
public class MyPopupCloseLink extends PopupCloseLink { @Override protected void onComponentTag(ComponentTag tag) { super.onComponentTag(tag); tag.put("onclick", "window.parent.refresh();"); } }
// TODO : Add other examples