Hi,

UploadProgressBar in a nested form also does not work (onsubmit added to a div 
representing the  inner form, but should be added to the onsubmit button of 
the outer form element).

a *very hacky* "solution" is something like 

boolean added = false;
protected void onBeforeRender() {
if(!added) {
added = true;
add(new UploadProgressBar("progress", this.getRootForm()));
}
super.onBeforeRender();
}

May or may not work, in my prelimary tests this solution works. 

might be better to add the onsubmit code to the most outer form, anyone 
skilled with javascript may help me here :)

Best Regards,
        Ilja Pavkovic

Am Freitag, 4. Dezember 2009 08:38:18 schrieb Igor Vaynberg:
> sounds like we may have to search up the component tree until we find a
>  form...
> 
> can you create a quickstart and attach it to the jira issue?
> 
> -igor
> 
> On Thu, Dec 3, 2009 at 10:43 PM, Doug Leeper <douglee...@yahoo.com> wrote:
> > Found the code where the iframe is being used
> > (resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js)
> >
> > When looking at the generated html for the modal window in a nested form
> > situation, it shows the submit button actually being submitted by
> > wicketSubmitFormById(formId,...)  The formId is the inner "form" but the
> > Form class actually generates a "div" element instead of a "form" (not
> > the root form) and removes the enctype.  Since the enctype has been
> > removed, the Javascript cannot create the iframe as it looking to see if
> > the form has the enctype="multipart/form-data"...hence the request is
> > being sent via Ajax still and not the iframe.
> >
> > So my thought is that that in the Form.onComponentTag() it should not
> > remove the enctype if isMultiPart() is true but add a variable enctype to
> > the div...but not sure if this is allowed.
> >
> > Can someone verify this as this is not my area of expertise (JavaScript
> > or Ajax internals)?
> >
> > Thanks
> > - Doug
> > --
> > View this message in context:
> > http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29
> >--tp26577255p26635788.html Sent from the Wicket - User mailing list
> > archive at Nabble.com.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> > For additional commands, e-mail: users-h...@wicket.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to