Did you try changing the visibility of your FileUploadField? If it's not visible, it won't be in the markup and won't be submitted. Not sure if Wicket will mark the form as multipart anyway, but it's worth a try.

-Ryan

On Aug 13, 2007, at 9:56 AM, Carlos Pita wrote:

Igor, is there a more or less provided mechanism to avoid wicket js
serialization of certain fields (file inputs in this case) upon form
submission? I mean something as a workaround that won't be a complete hack and will be relatively easy to implement. updating behaviors serialize just single fields and submit behaviors do its job for the entire form, so afaik
it's a matter of all or nothing (well, all or one) just right now.

On 8/13/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:

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




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to