[
https://issues.apache.org/jira/browse/WICKET-4319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13186389#comment-13186389
]
Andreas Köhler commented on WICKET-4319:
----------------------------------------
I think this is mainly due to wiquery putting the dialog's content outside the
form, breaking the form upload/processing logic.
IMHO, you might have better luck handling the modal dialog outside the main
form.
> nested ajax form can't be submitted in combination of nested multipart-form
> ----------------------------------------------------------------------------
>
> Key: WICKET-4319
> URL: https://issues.apache.org/jira/browse/WICKET-4319
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.19
> Environment: wicket 1.4.15 or 1.4.19
> wiquery
> firefox 3.6
> Reporter: axel becker
> Attachments: quickstart.zip
>
>
> I get the same Error as WICKET-1442 in wicket 1.4.15 and 1.4.19.
> In my Page are 3 Forms. One Mainform and two Subforms (fileUploadForm via
> Ajax-Button and chooserForm as modalDialog with Ajax-Submit).
> Subform fileUploadForm with Filedupload and Ajax Submit sets the isMultipart
> of my parentForm (implizit) to true.
> Subform categoryChooser with Ajaxsubmit inside a modal Dialog.
> If i submit the fileUploadForm or then MainForm, everythink is ok.
> If i submit categoryChooser, i saw during debugging, the isMultipart() of my
> parentForm is true an i get the following Exception.
> Furthermore, i can't find a hook, where i can skip the handleMultipart() of
> my parentForm.
> thanks
> axel
> Root cause:
> java.lang.IllegalStateException: ServletRequest does not contain multipart
> content. One possible solution is to explicitly call Form.setMultipart(true),
> Wicket tries its best to auto-detect multipart forms but there are certain
> situation where it cannot.
> at
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.<init>(MultipartServletWebRequest.java:113)
> at
> org.apache.wicket.protocol.http.servlet.MultipartServletWebRequest.<init>(MultipartServletWebRequest.java:83)
> at
> org.apache.wicket.protocol.http.servlet.ServletWebRequest.newMultipartWebRequest(ServletWebRequest.java:491)
> at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1708)
> at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:886)
> at
> org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135)
> at
> org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177)
> at
> org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
> at
> org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:157)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
> at
> org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
> at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
> at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436)
> at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
> at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486)
> at
> org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
> at java.lang.Thread.run(Thread.java:619)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira