You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Milan Křápek <He...@seznam.cz> on 2008/08/12 17:13:30 UTC

AjaxSubmitlink vs AjaxButton

Hi
  In my web application I realized form submiting by AjaxButtons. This wokrs great. I love the possibility to refresh just part of my page after submiting the form. Then  I decided to refactor my webapp tu use AjaxSubmitLink because I want to use some images and texts instead of buttons.
  This works too, but one thing make me confused. When I was using buttons I can submit my forms just by pressing the enter key, but with AjaxSubmitlink this  feathure does not work. 
  I try to debug it and get this results. When I use buttons and press enter, Wicket call onSubmit method implemented by AjaxButton, but when I use AjaxSubmitLinks and press enter, wicket call onSubmit method on the form not on the link.

Why? Has it some purpose, should I use AjaxSubmitLinks by another way, or it is some bug?
Thanks for any response.

Milan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxSubmitlink vs AjaxButton

Posted by Milan Křápek <He...@seznam.cz>.
Thaks. You are right. I thought I need just add the AjaxSubmitLink to form as a Button but it must be set as default button. 

Best regards

Milan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: AjaxSubmitlink vs AjaxButton

Posted by Ryan O'Hara <oh...@genome.chop.edu>.
I think you'll need to call form.setDefaultButton(submitLink).

Ryan

On Aug 12, 2008, at 11:13 AM, Milan Křápek wrote:

> Hi
>   In my web application I realized form submiting by AjaxButtons.  
> This wokrs great. I love the possibility to refresh just part of my  
> page after submiting the form. Then  I decided to refactor my  
> webapp tu use AjaxSubmitLink because I want to use some images and  
> texts instead of buttons.
>   This works too, but one thing make me confused. When I was using  
> buttons I can submit my forms just by pressing the enter key, but  
> with AjaxSubmitlink this  feathure does not work.
>   I try to debug it and get this results. When I use buttons and  
> press enter, Wicket call onSubmit method implemented by AjaxButton,  
> but when I use AjaxSubmitLinks and press enter, wicket call  
> onSubmit method on the form not on the link.
>
> Why? Has it some purpose, should I use AjaxSubmitLinks by another  
> way, or it is some bug?
> Thanks for any response.
>
> Milan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org