You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Tzvetanov Grigorov (Jira)" <ji...@apache.org> on 2021/08/09 11:15:00 UTC

[jira] [Commented] (WICKET-6914) Visibility change of "File Upload" via ajax causes "missing" form-data

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

Martin Tzvetanov Grigorov commented on WICKET-6914:
---------------------------------------------------

It sounds like a bug to me.

Could you please attach a mini application ([http://wicket.apache.org/start/quickstart.html)] that shows the problem that we could use for debugging ? Thanks!

> Visibility change of "File Upload" via ajax causes "missing" form-data
> ----------------------------------------------------------------------
>
>                 Key: WICKET-6914
>                 URL: https://issues.apache.org/jira/browse/WICKET-6914
>             Project: Wicket
>          Issue Type: Bug
>    Affects Versions: 9.4.0
>         Environment: Tested with Tomcat 8.5 and Firefox 90.0.2
>            Reporter: Sebastian Frömel
>            Priority: Major
>
> I am not 100% sure this could be counted towards a bug.
>  
> Hello reader :)
> We have have a file upload component within a Form. Via OnChangeAjaxBehavior we set the visibility for this file upload to false and put the file upload component into the target.add();
> This of course removes the file upload form the UI, as expected. But after pressing the submit button (no ajax), it will complain that our required text fields are not filled. But they were. They are "nulled" after the request.
> Side note: TextField has no value on the UI after submit. TextArea seems to keep its value, but both are processed/validate "empty", during their required-validation.
>  
> We think we found the possible issue.
> form + file upload = multipart form
> form - file upload = "normal form".
> It looks like that removing the file upload component via ajax, the form in the browser stays multipart, but wicket (probably) expects a "normal" form.
> Since we do not want to repaint the whole form at this point, since we do not send the data via ajax to the backend, we simply keep now the file upload visible, until it makes are workflow problem big enough to be solved another way.
> Do you think this is a bug, or just "us" using wicket the wrong way?
>  
> Best,
> Sebastian
>  
>  
>  
>  



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