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

UploadProcessBar doesn't work anymore with AjaxFormSubmitBehaviour("change") out of the box

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.0.0, 9.2.0
    • Fix Version/s: 9.3.0, 8.12.0
    • Component/s: wicket-extensions
    • Labels:
      None
    • Environment:
      Windows, Firefox (64-Bit)

      Description

      We migrated a project from Wicket 7 to 8.

      In one of our pages we used a FileUploadField that automatically uploads the selected file on change using an AjaxFormSubmitBehaviour("change").
      We also used the UploadProcessBar to show the process of the file upload.

      In Wicket 7.x.x uploading the file upon changing the FileUploadField will automatically trigger the UploadProcessBar.

      In Wicket 8.x.x uploading the file upon changing the FileUploadField does not trigger the UploadProcessBar automatically. Submitting the form via the submit button does trigger the UploadProcessBar.

      I can get the UploadProcessBar to work by adding onchange="Wicket.$('uploadForm').onsubmit();" to the <input type="file"/>.

      The UploadProcessBar is bound to the "onsubmit"-Eventcallback of the form, this event is no longer fired when submitting the form via Ajax in Wicket 8.x.x, this seems to have changed with https://github.com/apache/wicket/pull/256.
       
      Is this behaviour wanted? It seems unintuative to me that the Ajax-Request doesn't call the onsubmit() callback when the form is submitted to the server.

      You can reproduce this behaviour by using the attached example projekt
      or see  and changing the https://github.com/JanSchneider1/wicket-fileupload
      Wicket versions between 7.x.x and 8.x.x.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              svenmeier Sven Meier
              Reporter:
              janschneider Jan Schneider

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment