Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.7
-
None
-
None
-
any
Description
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().