Details
Description
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
Attachments
Attachments
Issue Links
- relates to
-
WICKET-6921 MultipartFormComponentListener breaks on hidden components
- Resolved