Hi Anantha, Did you get a resolution to this issue? I have the same problem.
Is this expected behavior I wonder, or a bug? SubmitLink will call the <form>'s onsubmit='???' handler, AjaxSubmitLink does not. On 4 January 2010 23:05, Anantha Kumaran <ananthakuma...@gmail.com> wrote: > hi pieter > > my problem is that the AjaxSubmitLink is not behaving like the SubmitLink > which calls the onsubmit before submitting > the form.currently i am using the mousedown(can't use onclick) of the > AjaxSubmitLink to do the validation stuffs but it breaks when the user > submit the form by pressing the return. > > > > > On Mon, Jan 4, 2010 at 12:03 AM, Pieter Degraeuwe < > pieter.degrae...@systemworks.be> wrote: > >> If you want to do some additional stuff, you can do it in the form a a >> Behaviour.. I did use such behaviour to ask a javascript confirm. If user >> does not confirm, the form is not submitted. >> >> new AttributeModifier("onclick", true, new Model<String>("if (!confirm('" + >> msg + "')) { /* do some additional stuff if not confirmed*/return;} else { >> /*do some stuff beform submitting the form*/}")) { >> �...@override >> protected String newValue(String currentValue, String >> replacementValue) { >> return replacementValue + currentValue; >> } >> }; >> >> On Mon, Jan 4, 2010 at 5:30 AM, Anantha Kumaran <ananthakuma...@gmail.com >> >wrote: >> >> > is there any way to do this on the client side.I want to do some client >> > side >> > stuff before submitting the form. >> > >> > On Sun, Jan 3, 2010 at 9:36 AM, Mathias Nilsson < >> > wicket.program...@gmail.com >> > > wrote: >> > >> > > >> > > form.add ( new AjaxSubmitLink(){ >> > > >> > > protected void onSubmit(AjaxRequestTarget target, Form form){ >> > > // Add feedback and do ajax stuff. >> > > } >> > > >> > > protected void onError(AjaxRequestTarget target, Form form){ >> > > // Add FeedbackPanel here >> > > target.add( feedback ); >> > > }}); >> > > -- >> > > View this message in context: >> > > >> > >> http://old.nabble.com/AjaxSubmitLink-not-calling-the-onsubmit-event-handler-tp27000018p27002962.html >> > > Sent from the Wicket - User 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 >> > > >> > > >> > >> >> >> >> -- >> Pieter Degraeuwe >> Systemworks bvba >> Belgiëlaan 61 >> 9070 Destelbergen >> GSM: +32 (0)485/68.60.85 >> Email: pieter.degrae...@systemworks.be >> visit us at http://www.systemworks.be >> > -- Richard Nichols :: http://www.visural.com/ :: http://www.richardnichols.net/ --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org