You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

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

  • No labels