You mean something like this :

public class PanelContentModal extends Modal<Void> {
    /** close callback. */
    private WindowClosedCallback windowClosedCallback = null;


    public PanelContentModal(final String varMarkupId) {
        super(varMarkupId);
        setUseCloseHandler(true);
    }

    @Override
    protected void onClose(final AjaxRequestTarget paramTarget) {
        if (windowClosedCallback != null) {
            windowClosedCallback.onClose(paramTarget);
        }
    }

     public PanelContentModal setWindowClosedCallback(final
WindowClosedCallback callback) {
        windowClosedCallback = callback;
        return this;
    }
} 

And then use it like a ModalWindow :

PanelContentModal  modal = new PanelContentModal("yourId");
modal.setWindowClosedCallback(new WindowClosedCallback() {
    @Override
    public void onClose(final AjaxRequestTarget paramTarget) {
        // Do your refresh
    }
});

regards,

Gabriel.
});

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-closed-callback-tp4671861p4671862.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to