[
https://issues.apache.org/jira/browse/WICKET-2616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jari Aarniala updated WICKET-2616:
----------------------------------
Attachment: WICKET-2616.patch
Patch against trunk attached.
> BaseWicketTester chooses a disabled component as the source of an
> AjaxFormSubmit event
> --------------------------------------------------------------------------------------
>
> Key: WICKET-2616
> URL: https://issues.apache.org/jira/browse/WICKET-2616
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.4
> Environment: Linux, Sun JDK 1.6
> Reporter: Jari Aarniala
> Priority: Minor
> Attachments: WICKET-2616.patch
>
>
> As of 1.4.4, disabled components can no longer submit forms (and rightly so):
> http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/markup/html/form/Form.java?r1=835242&r2=829503
> BaseWicketTester, however, doesn't check whether a submitting component is
> enabled when it chooses a component as the source of a submit event, it only
> checks the visibility:
> http://fisheye6.atlassian.com/browse/wicket/trunk/wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java?r=835641#l1287
> We have a TextField with an AjaxFormSubmitBehavior, and in the same form
> there's a disabled AjaxButton. In our test, we trigger a submit event from
> the TextField, but BaseWicketTester sets the disabled AjaxButton as the
> source, causing the check in Form.java to fail and throw an Exception.
> In the browser everything works fine, since the AjaxButton's
> *inputName=value* is not added to the request parameters, as expected.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.