Hello, I would like to put 2 buttons on a form (submit/cancel). This 2 buttons need to be localized. I tried to override the form's onSubmit, and add one new Button (submit) and a new subclass of Button (cancel).
My code looks like this: [CODE] Form form = new Form("formaddeditcurrency") { @Override protected void onSubmit() { // do submit (insert into db) } }; ... form.add(new Button("submitaddedit", new StringResourceModel("submit", this, null))); form.add(new Button("canceladdedit", new StringResourceModel("cancel", this, null)) { @Override public void onSubmit() { // do cancel } }); [/CODE] My problem is that when a user click "Cancel", the form still tried to be submitted (and since some fields are invalid, it writes some garbage to the Feedbackpanel). However, in markup, my cancel button is not a "submit", but a simple "button". How can I put several buttons on a form? Thank you for your help ;) -- View this message in context: http://www.nabble.com/Several-localized-buttons-in-a-form-tf4770293.html#a13645019 Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]