Actually there's one more problem. You cannot upload files by means of Ajax -
search the mailinglist for solutions to this problem.

As for the AjaxFormSubmitBehavior: it is sufficient to add it to the form,
there's no need to add it to the button as well. You don't even have to make
the button a wicket component, just add in in your HTML. That applies to
submit buttons. If it's something like a cancel button that shouldn't submit
the form, you should use a AjaxButton and set defaultformprocessing to
false. AFAIK using a Button in the form with ajax does only call the form's
onsubmit method.

hope that helps, regards
Michael


liny wrote:
> 
> Hi,sir:
> 
> I am newbie.
> I have a file upload web page and want to use AJAX to submit form.
> So I use IndicatingAjaxButton and add an AjaxFormSubmitBehavior to this
> button.
> Here is code snippet:
>     ajaxFormSubmitBehavior = new AjaxFormSubmitBehavior(uploadForm,
> "onclick")
>     {
>       protected void onSubmit(AjaxRequestTarget arg0)
>       {
>         System.out.println("ajaxFormSubmitBehavior - onSubmit");
>       }
> 
>       protected void onError(AjaxRequestTarget arg0)
>       {
>         System.out.println("ajaxFormSubmitBehavior - onError");
>       }
>     };
> 
>     indicatingAjaxBtn.add(ajaxFormSubmitBehavior);
>     uploadForm.add(indicatingAjaxBtn);
> 
> There are problems:
> 1. When click indicatingAjaxBtn button on html page, indicator
> disappeared. Why? How to solve it?
> 2. When click indicatingAjaxBtn button on html page, why it doesn't
> execute its protected onSubmit() method?
> 


-----
Michael Sparer
http://talk-on-tech.blogspot.com
-- 
View this message in context: 
http://www.nabble.com/Adding-AjaxFormSubmitBehavior-to-IndicatingAjaxButton-problems-tp16834656p16847802.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