Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-406

form fields are reset when a file upload fails

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 1.2.2, 1.2.3, 1.2.4, 1.2.5
    • Fix Version/s: 1.3.5
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Tomcat 5.5.9 , windows 2000 SP2

      Description

      If a form contains some fields and a file field, when an uploads fails (for example exceeds the maximum size) the form fields are reset. A better behaviour would be to group all failed validations and show all the messages at once. The relevant code is in class wicket.markup.html.form.Form in method onFormSubmitted, where the condition of handleMultipart is first checked and if it has not been completed the method returns, without processing the rest of the fields.

        Activity

        Hide
        knopp Matej Knopp added a comment -

        I'm not sure if it's possible to process the fields in this case. When the request size exceeds limit, the multipart request shouldn't be processed at all.

        Show
        knopp Matej Knopp added a comment - I'm not sure if it's possible to process the fields in this case. When the request size exceeds limit, the multipart request shouldn't be processed at all.
        Hide
        almaw Alastair Maw added a comment -

        Why? Can't we just treat it as that upload field failing validation?

        Show
        almaw Alastair Maw added a comment - Why? Can't we just treat it as that upload field failing validation?
        Hide
        ivaynberg Igor Vaynberg added a comment -

        whats the deal with this one?

        Show
        ivaynberg Igor Vaynberg added a comment - whats the deal with this one?
        Hide
        matej.knopp@gmail.com Matej Knopp added a comment -

        Heh, do I know?

        Show
        matej.knopp@gmail.com Matej Knopp added a comment - Heh, do I know?
        Hide
        knopp Matej Knopp added a comment -

        I'm not sure, if we can just exctract the fields from multipart request while discarding the upload. Normally, when fields fail validation, we display the values from post (stored inside formcomponent rawinput). But when upload fails, we don't really have those values, do we?

        Show
        knopp Matej Knopp added a comment - I'm not sure, if we can just exctract the fields from multipart request while discarding the upload. Normally, when fields fail validation, we display the values from post (stored inside formcomponent rawinput). But when upload fails, we don't really have those values, do we?
        Hide
        ivaynberg Igor Vaynberg added a comment -

        so whats the deal? close with WONT-FIX?

        Show
        ivaynberg Igor Vaynberg added a comment - so whats the deal? close with WONT-FIX?
        Hide
        knopp Matej Knopp added a comment -

        Should anyone have a good idea of how to fix this please reopen.

        Show
        knopp Matej Knopp added a comment - Should anyone have a good idea of how to fix this please reopen.

          People

          • Assignee:
            knopp Matej Knopp
            Reporter:
            jdelajaraf Jaime De La Jara
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development