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/09/21 14:04:00 UTC
[jira] [Resolved] (WICKET-6921) MultipartFormComponentListener
breaks on hidden components
[ https://issues.apache.org/jira/browse/WICKET-6921?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Tzvetanov Grigorov resolved WICKET-6921.
-----------------------------------------------
Fix Version/s: 9.6.0
10.0.0
Resolution: Fixed
> MultipartFormComponentListener breaks on hidden components
> ----------------------------------------------------------
>
> Key: WICKET-6921
> URL: https://issues.apache.org/jira/browse/WICKET-6921
> Project: Wicket
> Issue Type: Bug
> Affects Versions: 9.5.0
> Reporter: Mathieu Mitchell
> Assignee: Martin Tzvetanov Grigorov
> Priority: Minor
> Fix For: 10.0.0, 9.6.0
>
> Attachments: WICKET-6914-demo.zip
>
>
> MultipartFormComponentListener does not seem to handle hidden components, or components included in an hidden container.
> Currently, javascript errors in browser console appear when rendering any component while forms are included inside unrelated hidden containers.
> This problem first appeared in Wicket 9.5.0.
> {{Uncaught TypeError: Cannot read properties of null (reading 'form')}}
> This appears to be caused because the component cannot be found in the DOM.
> {{Wicket.$('fileUpload9').form.enctype='application/x-www-form-urlencoded'}}}
> This unhandled error stops further evaluation of javascript statements.
> This regression appears to be caused by the MultipartFormComponentListener that was recently added while fixing WICKET-6914.
> Generally, form components and forms can be included in an hidden container without problem.
> Furthermore, the MultipartFormComponentListener stops after handling the first component of a multipart form. A single page could container multiple forms and the other forms would not have the right encoding-type set.
> Attached is the democase for WICKET-6914, edited to demonstrate the problems caused by the regression.
> I also added a test case and modified the code to satisfy the new requirements.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)