no, ajax submits do not support multipart forms. -igor
On 8/13/07, Carlos Pita <[EMAIL PROTECTED]> wrote: > > Hi all, > > is it possible to ajax submit a form that has a file input between its > fields, even if this input is always empty at the time of submission? > > For example, the following example throws a 'ServletRequest does not > contain > multipart content' exception when clicking the ajaxSubmit button, even if > form.setMultiPart(false). > > Form form = new Form("form"); > form.add (new TextField("text", new PropertyModel(this, "text"))); > form.add(new FileUploadField("file")); > form.add(new AjaxButton("ajaxSubmit", form) { > protected void onSubmit(AjaxRequestTarget target, Form form) { > } > }); > > The fact is that I will upload images using another, hidden and not > nested, > form with an iframe as its target, so the above form will never be > submitted > with a non-empty file input. > > How can I do this? > > Thank you in advance > Carlos >