Form の、setMultiPart(true)

Wicket6 で、以下が発生、

Last cause: 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.WicketMessage
: Method onRequest of interface org.apache.wicket.behavior.IBehaviorListener targeted
at org.apache.wicket.ajax.markup.html.form.AjaxButton$1@265f9b34
on component [AjaxButton [Component id = ajaxsubmit]] threw an exception

なぜ? AjaxButton で submit する時、単純な input type="text" が2個しかないのに、
フォーム送信で、form enctype "multipart/form-data" でないと、ならなくなったの?

これが、発生した時、ブラウザ戻るボタンを押して再度、AjaxButton を押すと成功する。


対処は、、、

org.apache.wicket.markup.html.form.Form による、

Form の、setMultiPart(true) を call しておくこと。

(充分に、デバッグでしてない自分が悪いのだけど)