You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2009/11/03 21:23:32 UTC

[jira] Commented: (WICKET-2561) findSubmittingButton returns wrong button in multipart form in IE

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

Igor Vaynberg commented on WICKET-2561:
---------------------------------------

have you tried with wicket-1.4.x snapshot?

> findSubmittingButton returns wrong button in multipart form in IE 
> ------------------------------------------------------------------
>
>                 Key: WICKET-2561
>                 URL: https://issues.apache.org/jira/browse/WICKET-2561
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4.2, 1.4.3
>            Reporter: Bart Duim
>         Attachments: myproject.zip
>
>
> I wanted to create a page which uploads a file. For this, I created a form that has two buttons, a cancel and a ok button. The DefaultFormProcessing of the cancel button was set to false. This turned out to be a problem, in Internet Explorer the onSubmit (and onValidate) of the form was never called when ok was clicked.
> In multipart IE sends not only the clicked button in the request, but also all the other buttons. In findSubmittingButton() Wicket checks all the children of the page, to see if it is present as a parameter in the request. In the case of IE this wil allways return the first button that is in the request, and not the clicked button.
> Possible solution would be to make sure the request in IE contains only the clicked button, but my javascript skills are way to bad for that. 
> An other solution would be to check for the right value of the request parameter, but i don't know if every browser will send the same value.
> request (via Fiddler) when clicked in IE:
> -----------------------------7d92a027a08b2
> Content-Disposition: form-data; name="simpleForm1_hf_0"
> -----------------------------7d92a027a08b2
> Content-Disposition: form-data; name="input1"
> input here
> -----------------------------7d92a027a08b2
> Content-Disposition: form-data; name="cancel_button"
> cancel_button
> -----------------------------7d92a027a08b2
> Content-Disposition: form-data; name="ok_button"
> ok_button
> -----------------------------7d92a027a08b2
> Content-Disposition: form-data; name="ok_button"
> 1
> -----------------------------7d92a027a08b2--
> request when ok is clicked in Firefox:
> -----------------------------21991321967783
> Content-Disposition: form-data; name="simpleForm1_hf_0"
> -----------------------------21991321967783
> Content-Disposition: form-data; name="input1"
> input here
> -----------------------------21991321967783
> Content-Disposition: form-data; name="ok_button"
> 1
> -----------------------------21991321967783--

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.