You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Ivan Vasilev (JIRA)" <ji...@apache.org> on 2010/11/10 20:50:13 UTC
[jira] Created: (WICKET-3156) Submitting button of a
multiple-button form is not resolved correctly
Submitting button of a multiple-button form is not resolved correctly
---------------------------------------------------------------------
Key: WICKET-3156
URL: https://issues.apache.org/jira/browse/WICKET-3156
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.5-M3
Reporter: Ivan Vasilev
This bug affects Form.findSubmittingButton().
Inside it all the form submitting children of the page are visited. A check is made whether the current form submitting component is a child of the current form.
If so another check is performed:
if ((!parameters.getParameterValue(name).isNull()) ||
!parameters.getParameterValue(name + ".x").isNull())
I saw that in case of a button the condition !parameters.getParameterValue(name).isNull()) is true (returns the "value" attribute of the button), so the button can be considered the submitting component of the form.
However if there are multiple buttons in the form in this case the first visited button will be returned, which is not necessary the one that actually submitted the form.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (WICKET-3156) Submitting button of a
multiple-button form is not resolved correctly
Posted by "Igor Vaynberg (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Igor Vaynberg resolved WICKET-3156.
-----------------------------------
Resolution: Cannot Reproduce
Assignee: Igor Vaynberg
please attach a quickstart demonstrating the problem
> Submitting button of a multiple-button form is not resolved correctly
> ---------------------------------------------------------------------
>
> Key: WICKET-3156
> URL: https://issues.apache.org/jira/browse/WICKET-3156
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Ivan Vasilev
> Assignee: Igor Vaynberg
> Attachments: test-WICKET-3156.patch
>
>
> This bug affects Form.findSubmittingButton().
> Inside it all the form submitting children of the page are visited. A check is made whether the current form submitting component is a child of the current form.
> If so another check is performed:
> if ((!parameters.getParameterValue(name).isNull()) ||
> !parameters.getParameterValue(name + ".x").isNull())
> I saw that in case of a button the condition !parameters.getParameterValue(name).isNull()) is true (returns the "value" attribute of the button), so the button can be considered the submitting component of the form.
> However if there are multiple buttons in the form in this case the first visited button will be returned, which is not necessary the one that actually submitted the form.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (WICKET-3156) Submitting button of a
multiple-button form is not resolved correctly
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12964472#action_12964472 ]
Hudson commented on WICKET-3156:
--------------------------------
Integrated in Apache Wicket 1.4.x #295 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.4.x/295/])
> Submitting button of a multiple-button form is not resolved correctly
> ---------------------------------------------------------------------
>
> Key: WICKET-3156
> URL: https://issues.apache.org/jira/browse/WICKET-3156
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Ivan Vasilev
> Assignee: Igor Vaynberg
> Attachments: test-WICKET-3156.patch
>
>
> This bug affects Form.findSubmittingButton().
> Inside it all the form submitting children of the page are visited. A check is made whether the current form submitting component is a child of the current form.
> If so another check is performed:
> if ((!parameters.getParameterValue(name).isNull()) ||
> !parameters.getParameterValue(name + ".x").isNull())
> I saw that in case of a button the condition !parameters.getParameterValue(name).isNull()) is true (returns the "value" attribute of the button), so the button can be considered the submitting component of the form.
> However if there are multiple buttons in the form in this case the first visited button will be returned, which is not necessary the one that actually submitted the form.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (WICKET-3156) Submitting button of a
multiple-button form is not resolved correctly
Posted by "Pedro Santos (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/WICKET-3156?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pedro Santos updated WICKET-3156:
---------------------------------
Attachment: test-WICKET-3156.patch
Hi Ivan, you're forgetting to consider that the browser adds the submit component input name as an request parameter. So the findSubmittingButton will find the correct submitting component. Anyway, I'm sending an test case to show it and prevent this kind of bug from happen. Try to break it, and if you can, send back how.
> Submitting button of a multiple-button form is not resolved correctly
> ---------------------------------------------------------------------
>
> Key: WICKET-3156
> URL: https://issues.apache.org/jira/browse/WICKET-3156
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5-M3
> Reporter: Ivan Vasilev
> Attachments: test-WICKET-3156.patch
>
>
> This bug affects Form.findSubmittingButton().
> Inside it all the form submitting children of the page are visited. A check is made whether the current form submitting component is a child of the current form.
> If so another check is performed:
> if ((!parameters.getParameterValue(name).isNull()) ||
> !parameters.getParameterValue(name + ".x").isNull())
> I saw that in case of a button the condition !parameters.getParameterValue(name).isNull()) is true (returns the "value" attribute of the button), so the button can be considered the submitting component of the form.
> However if there are multiple buttons in the form in this case the first visited button will be returned, which is not necessary the one that actually submitted the form.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.