My submit action is on the modal popup which does NOT contain a FileUpload Field, but the form the modal is launched from does have a FileUpload field.
So, we have a page with a button added to a form that pops up a modal dialog that also defines a form. This modal popup has a Submit button that does so via Ajax (e.g., AjaxButton). Once we click the ajax submit button, we get the error below. -----Original Message----- From: James Carman [mailto:jcar...@carmanconsulting.com] Sent: Tuesday, March 09, 2010 2:30 PM To: users@wicket.apache.org Subject: Re: Nested Forms and Multipart Fileupload Issue You're trying to submit a form via ajax to upload a file? On Tue, Mar 9, 2010 at 4:26 PM, Corbin, James <jcor...@iqnavigator.com> wrote: > This issue seems to pop up in our environment from time to time and trying to > figure out how to fix it once and for all. > > We have a page with a form that pops up modal window with a form specified as > well. > > When we try to submit, we get the following exception: > > 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:500) > at org.apache.wicket.markup.html.form.Form.handleMultiPart(Form.java:1668) > at org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:862) > at > org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:135) > at > org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177) > ... > > Setting Form.setMultipart(true) on either form has no affect. > > We are running Wicket Version 1.4.7. > > Is there a fix for this issue? > > Is this JIRA Issue related??? > https://issues.apache.org/jira/browse/WICKET-2749 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org