[
https://issues.apache.org/jira/browse/WICKET-2790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov resolved WICKET-2790.
-------------------------------------
Resolution: Fixed
Fix Version/s: 1.5-RC8
With r1162567 if the ajax behavior is AjaxFormSubmitBehavior its form will be
used to set the multi part hint.
Let us know if this is not enough, because the old title of this ticket was
about "executeAjaxEvent()" which is not always related to form submittion.
> Submitting a form with Ajax in WicketTester does not check if form is
> multiPart
> -------------------------------------------------------------------------------
>
> Key: WICKET-2790
> URL: https://issues.apache.org/jira/browse/WICKET-2790
> Project: Wicket
> Issue Type: Improvement
> Affects Versions: 1.4.7
> Environment: any
> Reporter: Michał Letyński
> Assignee: Martin Grigorov
> Fix For: 1.5-RC8
>
>
> While executing wicketTester.executeAjaxEvent(butooon, "onclick")
> i get 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.
> executeAjaxEvent method does not check if form is multiPart. To workaround
> this problem before executeAjaxEvent we can execute:
> MockHttpServletRequest servletRequest =
> wicketTester.getServletRequest();
> servletRequest.setUseMultiPartContentType(true);
> But its annoying to set this flag again and again. Could you extend
> executeAjaxEvent to check if form is multiPart ? Similar checking is already
> done in FormTester.onSubmit().
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira