Return-Path: X-Original-To: apmail-wicket-users-archive@minotaur.apache.org Delivered-To: apmail-wicket-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EAE4E175D5 for ; Thu, 12 Feb 2015 23:07:37 +0000 (UTC) Received: (qmail 30915 invoked by uid 500); 12 Feb 2015 23:07:34 -0000 Delivered-To: apmail-wicket-users-archive@wicket.apache.org Received: (qmail 30878 invoked by uid 500); 12 Feb 2015 23:07:34 -0000 Mailing-List: contact users-help@wicket.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@wicket.apache.org Delivered-To: mailing list users@wicket.apache.org Received: (qmail 30867 invoked by uid 99); 12 Feb 2015 23:07:34 -0000 Received: from mail-relay.apache.org (HELO mail-relay.apache.org) (140.211.11.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Feb 2015 23:07:34 +0000 Received: from mail-wg0-f44.google.com (mail-wg0-f44.google.com [74.125.82.44]) by mail-relay.apache.org (ASF Mail Server at mail-relay.apache.org) with ESMTPSA id AB7491A03DC for ; Thu, 12 Feb 2015 23:07:33 +0000 (UTC) Received: by mail-wg0-f44.google.com with SMTP id k14so3438107wgh.3 for ; Thu, 12 Feb 2015 15:07:32 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.180.221.73 with SMTP id qc9mr1389300wic.8.1423782452560; Thu, 12 Feb 2015 15:07:32 -0800 (PST) Received: by 10.216.185.198 with HTTP; Thu, 12 Feb 2015 15:07:32 -0800 (PST) Received: by 10.216.185.198 with HTTP; Thu, 12 Feb 2015 15:07:32 -0800 (PST) In-Reply-To: References: Date: Fri, 13 Feb 2015 01:07:32 +0200 Message-ID: Subject: Re: Ajax submit form with FileUploadField From: Martin Grigorov To: users@wicket.apache.org Content-Type: multipart/alternative; boundary=001a1134d08e528d7c050eec2f3a --001a1134d08e528d7c050eec2f3a Content-Type: text/plain; charset=UTF-8 with or without file field Wicket submits all fields and on the server side by using the submitter button decides which form to process On Feb 12, 2015 8:00 PM, "mscoon" wrote: > Thank you for your answer. > > One more thing. Since I am trying to submit an inner form (which has been > rendered as a div) and which does not contain a FileUploadField, why would > wicket use an IFrame? Is the decision being made based on the outer form > for all ajax submit links? > > On Thu, Feb 12, 2015 at 11:41 PM, Martin Grigorov > wrote: > > > Hi, > > > > Yes, it does. > > When there is a file input in the form Wicket needs to use an IFrame to > be > > able to send the binary data because XmlHttpRequest v1 (IE 8/9/10 I > think) > > doesn't support sending binary. > > The related code is at > > > > > https://github.com/apache/wicket/blob/master/wicket-core/src/main/java/org/apache/wicket/ajax/res/js/wicket-ajax-jquery.js#L623 > > > > Martin Grigorov > > Wicket Training and Consulting > > https://twitter.com/mtgrigorov > > > > On Thu, Feb 12, 2015 at 11:36 PM, mscoon wrote: > > > > > Since no-one has responded, let me try to rephrase the question: is > > wicket > > > doing something different when submitting a form via ajx without and > > with a > > > FileUploadField? If yes, could you please give me some pointers in the > > code > > > to look at? > > > > > > Thanks > > > Marios > > > > > > On Tue, Feb 10, 2015 at 4:36 PM, mscoon wrote: > > > > > > > Hi all, > > > > > > > > We are seeing strange behavior in a form that contains a > > FileUploadField > > > > when submitted with an AjaxSubmitLink. What happens is: > > > > 1. The form is embedded in another form, so wicket renders it as a > div > > > > 2. The form is removed from it's parent element and placed within a > > > JQuery > > > > dialog > > > > 3. The outher form contains a FileUploadField > > > > > > > > When the inner form is submitted we get the following error in the > ajax > > > > debug panel: > > > > "Cannot submit form with id criteria69 because there is no form > element > > > in the hierarchy." > > > > > > > > Removing the FileUploadField makes the error disappear, even though > > there > > > > is no form element in the hierarchy due to step (2) above. > > > > > > > > Any ideas why this is happening? > > > > > > > > Thanks > > > > Marios > > > > > > > > > > --001a1134d08e528d7c050eec2f3a--