Sorry for the noise,

I was able to do it with 2 AjaxButton added on the form.

Pierre


Pierre G 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Multi-buttons-in-ajax-form-tp15586379p15586949.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to