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