[
https://issues.apache.org/jira/browse/WICKET-3144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928148#action_12928148
]
Marieke Vandamme commented on WICKET-3144:
------------------------------------------
Jeremy,
I posted this on mailinglist, but just got a workaround:
http://apache-wicket.1842946.n4.nabble.com/Modalwindow-with-confirm-box-on-close-button-td3014935.html
I don't know how overriding the close function can solve my problem. Maybe I
can explain better with an example of something we use very often:
WebMarkupContainer btnSubmit = new WebMarkupContainer("btnSubmit");
btnSubmit.add(new AjaxFormSubmitBehavior("onclick"){
protected void onSubmit(AjaxRequestTarget target) {
}
protected CharSequence getEventHandler() {
String confirmText = "...";
return "if(!confirm('" + confirmText + "')) return false;" +
super.getEventHandler();
}
});
When overriding the close function or the closeButtonCallback, it's to late. My
confirmbox should be just before going back to the server. Or am I missing
something?
Many thanks. Kind Regards, Marieke Vandamme
> Extra client-side scripting before closing modalwindow
> ------------------------------------------------------
>
> Key: WICKET-3144
> URL: https://issues.apache.org/jira/browse/WICKET-3144
> Project: Wicket
> Issue Type: New Feature
> Components: wicket-extensions
> Reporter: Marieke Vandamme
>
> I would like to add extra client-side scripting that is executed before the
> modalwindow is closed.
> Now you can already add server-side with overriding onCloseButtonClicked, but
> then the window is already closing.
> I need this because I want to show a confirm-box to the user, so that he can
> confirm that he wants to close the window.
> Thanks, Marieke Vandamme
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.