there is a method called findSubmittingButton() regards Dipu
On Feb 20, 2008 10:41 AM, Pierre Gilquin <[EMAIL PROTECTED]> wrote: > hi all, > > I try to have to have 2 buttons in a form. This form is used in an ajax > window. > > in html, they are 2 standards buttons > <input type="submit" value="Do Task1"> > <input type="submit" value="Do Task 2"> > > In the panel of the ajax window, I have an AjaxFormSubmitBehavior: > > form.add(new AjaxFormSubmitBehavior("onsubmit") { > protected void onSubmit(AjaxRequestTarget target) { > doTask1(); > // doTask2(); > modal.close(target); > } > protected void onError(AjaxRequestTarget target) { > .... > > When one button is clicked, the onSubmit method is executed. What can I do > to distinct which button was used ? > > In some circumstance, I need one button to be invisible or disabled, I try > to make it a real wicket object without > success the following way : > form.add(new WebComponent("button1").add AjaxFormSubmitBehavior( > > Thank in advance for your help. > > Pierre > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >