You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2016/04/06 19:12:25 UTC

[jira] [Commented] (WICKET-6139) AjaxButton forces rendering type="button"

    [ https://issues.apache.org/jira/browse/WICKET-6139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15228671#comment-15228671 ] 

Sven Meier commented on WICKET-6139:
------------------------------------

Hi Roland,

I think we revert part of the commit to WICKET-5594 and leave the button type as specified in the markup:

- if JavaScript is disabled, the browser will submit the form non-Ajax and AjaxButton#submit() will log a warning. This is actually an improvement over the current situation, where clicking the buttons does nothing.
- if JavaScript is enabled, Wicket will submit the form via XMLHttpRequest regardless whether you've clicked the button or used the enter key to submit the first submitting button.

WDYT?


> AjaxButton forces rendering type="button" 
> ------------------------------------------
>
>                 Key: WICKET-6139
>                 URL: https://issues.apache.org/jira/browse/WICKET-6139
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 7.0.0-M2
>            Reporter: Roland Foerther
>            Assignee: Sven Meier
>            Priority: Minor
>
> Since WICKET-5594 AjaxButton forces rendering type="button". I understand, that this is the desired behavior if JavaScript is disabled. On the other hand it disables the browser behavior "submit form on enter" when JavaScript is enabled. I can't see any problem on using type="submit" in conjunction with AjaxButton, since the designated Methods onSubmit(AjaxRequestTarget target, Form<?> form), onAfterSubmit(AjaxRequestTarget target, Form<?> form) and onError(AjaxRequestTarget target, Form<?> form) will be called when pressing enter.
> The new behavior affects a lot of forms in our wicket applications we are currently porting from Wicket 6 to 7. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)