Have a look at this blog http://www.jroller.com/karthikg/entry/modelling_client_side_form_modifications#comments
Basically state of the form onload is compared to that of beforeonunload. Just understand the concept and modify accordingly. Here the author tries to add a behavior to form's page in bind method of behavior. Not sure- but the page may be null at this point if form is not yet attched to page. Just modify accd. -swaroop JulianS wrote: > > I'd like to know if there is a way to prompt a user to save when leaving a > page using Wicket 1.2.6. I need to display a confirmation message only if > the form has been dirtied. > > There is a javascript-only solution > http://www.4guysfromrolla.com/webtech/100604-1.shtml here . It's kind of > ugly because you have to generate custom javascript for every form. Is > there a more elegant way with Wicket? > > I know that Wicket 1.3 has the onBeforeUnload hook, but I am using 1.2.6 > and cannot upgrade at the moment. > > Any ideas are appreciated. > > -- View this message in context: http://www.nabble.com/Prompting-a-User-to-Save-When-Leaving-a-Page-tf4549589.html#a12993136 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
