[ https://issues.apache.org/jira/browse/WICKET-3236?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12969758#action_12969758 ]
Cedric Thiebault commented on WICKET-3236: ------------------------------------------ Point 1) was not a bug, I just needed to set multipart on parent form: http://mail-archives.apache.org/mod_mbox/wicket-users/201012.mbox/%3c4e39ff00-717a-48fa-8dcf-438b502bd...@meillet.com%3e But 2) still open... > File upload with inner form and modal window > -------------------------------------------- > > Key: WICKET-3236 > URL: https://issues.apache.org/jira/browse/WICKET-3236 > Project: Wicket > Issue Type: Bug > Components: wicket > Affects Versions: 1.4.14 > Reporter: Cedric Thiebault > Attachments: wicket-modal-upload.zip > > > I want to upload file with an Ajax form that is in a modal window. The modal > and its form are part of the main form. > 1) I'm able to upload a file but once the modal is closed, when I submit the > main form (not the one for uploading), I get an 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:489) > 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:142) > 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.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148) > at > org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387) > at > org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) > at > org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) > at > org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) > at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417) > at > org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) > at > org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) > at > org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) > at org.mortbay.jetty.Server.handle(Server.java:324) > at > org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535) > at > org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880) > at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) > at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212) > at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) > at > org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) > at > org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) > Use the quick start I've uploaded to reproduce this: > - mvn jetty:run > - click on "Add new file (panel modal)" and upload a file > - then, once the modal is closed, click on "Submit input text" > --> exception > 2) I've also tried to use a modal with a WebPage instead of a Panel: it works > well except that the DataTable does not reflect the new uploaded files... > even if everything is fine in background with models. > Any ideas of what I did wrong here? Is it because of AjaxRequestTarget > between pages and panels? > Thanks for your help. > Cedric -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.