Hi,

When using 'beforeunload' event you need to use synchronous Ajax call.
Additionally you need to prevent the default behavior of the JavaScript
event to stop the leaving of the page.

Instead of doing your manual work in
AbstractDefaultAjaxBehavior#renderHead() you can just use
AjaxEventBehavior("beforeunload")


On Mon, May 13, 2013 at 7:26 PM, raphw <[email protected]> wrote:

> I posted a question on StackOverflow on how I can receive a callback value
> from a Java component using Ajax:
>
>
> http://stackoverflow.com/questions/16527463/wicket-6-ajax-call-java-component-from-javascript-and-retreive-value
>
> Any help on this would be very appreciated since I am stuck on this one!
> Thank you, Rafael
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Wicket-6-Ajax-Call-Java-component-from-JavaScript-and-retreive-value-tp4658754.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>

Reply via email to