Modal window does this like
*// Wicket.Window.unloadConfirmation is deprecated but we need to check it // for backward compatibility. Remove it after Wicket 7.0 **if *(*this*.settings.unloadConfirmation && Wicket.Window.unloadConfirmation) { Wicket.Event.add(window, *'beforeunload'*,*this*.onbeforeunload); } I see there is also an OnEventHeaderItem... On Wed, Apr 20, 2016 at 11:57 AM, Lorne Malvo <caffeineindu...@gmail.com> wrote: > Does Wicket have any built in support for showing a "Are you sure you want > to > navigate away from this page" message when the user navigates away from the > page? > > What would be the simplest way to detect when a user is trying to navigate > away from a page, execute some Java code, and then show a "Are you sure you > want to navigate away..." message? > > Thanks! > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Wicket-way-to-show-a-Are-you-sure-you-want-to-navigate-away-page-tp4674323.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 > > -- Regards - Ernesto Reinaldo Barreiro