You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (Jira)" <ji...@apache.org> on 2021/02/17 00:02:00 UTC

[jira] [Commented] (WICKET-6868) UploadProcessBar doesn't work anymore with AjaxFormSubmitBehaviour("change") out of the box

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

Sven Meier commented on WICKET-6868:
------------------------------------

Before 8.x onsubmit() was called for multipart Ajax form submits *only*.

Since Wicket 8.x Ajax multipart submits are actually transported via Ajax now (no longer to an iframe), but the check for onsubmit() was lost during that change.

> UploadProcessBar doesn't work anymore with AjaxFormSubmitBehaviour("change") out of the box
> -------------------------------------------------------------------------------------------
>
>                 Key: WICKET-6868
>                 URL: https://issues.apache.org/jira/browse/WICKET-6868
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket-extensions
>    Affects Versions: 8.0.0
>         Environment: Windows, Firefox (64-Bit)
>            Reporter: Jan Schneider
>            Priority: Minor
>         Attachments: wicket-fileupload.zip
>
>
> 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_.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)