Sebastien Briquet
unread,Oct 7, 2012, 7:19:24 AM10/7/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to wicket-j...@googlegroups.com
Hi Markus,
Closing the dialog using the X-icon triggers the same jQuery 'close' (and 'beforeClose') event(s) than the 'close' method. So, there is no handler bound to this jQuery 'close' event because it would have resulted to a dual round-trip on button's click... (by default, buttons are closing the dialog).
Anyway, I added AbstractDialog#onConfigure(JQueryBehavior) (not yet committed), so you will be able to do something like this:
behavior.setOption("beforeClose", "function(event, ui) { if (event.button == 0 && !confirm('Are you sure you want to close?')) return false; }");
Hope this answers your question (I don't know your use case actually)...
Best regards,
Sebastien.