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

Martin Grigorov commented on WICKET-5597:
-----------------------------------------

org.apache.wicket.ajax.markup.html.form.AjaxButton#onComponentTag doesn't check 
that it is attached to a <button> HTML element.
It seems it just assumes that this is the case.

I am not sure that we have to use #checkComponentTag(tag, "button") though, 
because I did this recently for DataTable component and there was a complaint 
by a user who uses custom DataTable with a <div> ...

So maybe we can do: if ("button".equalsIgnorecase(tag.getName())) 
{tag.put("type", "button")}

> button behaviour changed
> ------------------------
>
>                 Key: WICKET-5597
>                 URL: https://issues.apache.org/jira/browse/WICKET-5597
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 7.0.0-M1
>         Environment: tomcat linux
>            Reporter: Peter Henderson
>            Assignee: Sven Meier
>         Attachments: myproject.tar.gz
>
>
> The behaviour of a <button> component with no type="button" attribute has 
> changed between 6.15 and 7 M1.   
> When the button is connected to an AjaxLink.
> In 6.15 there is no form submit
> In 7 M1 the form is submitted.
> I think the code should control if the form is submitted or not, using 
> AjaxSubmitLink or AjaxLink not the markup.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to