catch jquery event at AjaxEventBehavior
Hi; I used jquery dialog. I can open and close jquery dialog box. I represent jquery dialog as a panel at wicket side. My question is how can i catch jquery close event ? I tested like below but it doesn't work dialogConfirmation.add(new AjaxEventBehavior(close) { @Override protected void onEvent(AjaxRequestTarget target) { System.out.println( closed ); } }) ; Thanks.
Re: catch jquery event at AjaxEventBehavior
Hi, You can use the setCloseEvent method of the Dialog component: http://code.google.com/p/wiquery/source/browse/trunk/src/main/java/org/odlabs/wiquery/ui/dialog/Dialog.java#702 And if you want to associate the event to an Ajax Behavior, I suggest you to look on this example ( http://code.google.com/p/wiquery-demos/source/browse/trunk/wiquery-examples/src/main/java/org/odlabs/wiquery/examples/dialog/DialogPage.java) where we link an Ajax Behavior to a button of the Dialog (and so, you can reproduce it for the close event) Regards Julien Roche On Mon, Aug 1, 2011 at 8:57 AM, Lurtz Nazgul lu...@ymail.com wrote: Hi; I used jquery dialog. I can open and close jquery dialog box. I represent jquery dialog as a panel at wicket side. My question is how can i catch jquery close event ? I tested like below but it doesn't work dialogConfirmation.add(new AjaxEventBehavior(close) { @Override protected void onEvent(AjaxRequestTarget target) { System.out.println( closed ); } }) ; Thanks.
Re: catch jquery event at AjaxEventBehavior
Hi ; I used AbstractDefaultAjaxBehavior to catch jquery close event. On jquery side i triggered event when jquery event window closed. wicketAjaxGet('+behavior.getCallbackUrl()+ '); It is little tricky. Thanks. From: Lurtz Nazgul lu...@ymail.com To: users@wicket.apache.org Sent: Mon, August 1, 2011 9:57:30 AM Subject: catch jquery event at AjaxEventBehavior Hi; I used jquery dialog. I can open and close jquery dialog box. I represent jquery dialog as a panel at wicket side. My question is how can i catch jquery close event ? I tested like below but it doesn't work dialogConfirmation.add(new AjaxEventBehavior(close) { @Override protected void onEvent(AjaxRequestTarget target) { System.out.println( closed ); } }) ; Thanks.