You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Carlos F <ca...@yahoo.com> on 2008/05/19 16:43:02 UTC

Form - asyn submission with file upload

After trying to async submit a form with a file upload field for a few hours I trolled around the message board and JIRA and ran across this:

http://issues.apache.org/jira/browse/TAPESTRY-1348

Is trying to async submit a form with a file upload field a DEAD END?

We tried to add the IFrame transport mechanism . . . however this did not trigger the request.  Looking at the code it appears that the IFrame transport mechanism does not support async submissions etc.  The tacos bug system has a related bug that mentions other changes that may be necessary to fix this:

http://tacoscomponents.jot.com/BugReporter/Bug62

Has anyone been able to successfully async submit a form with a file upload field?

Carlos

Re: Form - asyn submission with file upload

Posted by Kalle Korhonen <ka...@gmail.com>.
Just ran into the same use case myself; I would like to use an asynch form
with a file upload in T4.1.5 app. I wonder if anybody has solved this
already. Carlos, how did you go about doing it?

Kalle


On Mon, May 19, 2008 at 2:08 PM, Carlos F <ca...@yahoo.com> wrote:

> Andreas,
>
> thanks for the reply!
>
> -->  how did you enable the IFrame transport?
>
> i added "dojo.require("dojo.io.IframeIO");" to a script file.  However,
> this was insufficient.  IframeTransport.canHandle() fails for two reasons:
>
> - the response type that tapestry was requesting was "text/xml" - and as
> the bug you emailed me notes, that is not a supported format for the
> IframeIO
> - it also appears that the IframeIO also requires the call to be
> synchronous.  tapestry passes the request as async.
>
> This might be a little naive, but can I avoid the problems the IFrame has
> with "text/xml" by specify that the response should come as JSON?
>
> Carlos
>
> Andreas Andreou <an...@gmail.com> wrote: See
>
> Unfortunately, dojo decided to skip support for XML return types for
> IframeIO
> (which is needed for file uploads) due to problems with making it
> cross-browser.
>
> What this basically means for Tapestry is that async submit of forms
> having files
> cannot return the expected xml responses... however, i believe that the
> requests
> do actually take place - how did you enable the IFrame transport?
>
> Another idea (i think someone had mentioned doing this in this ML) is to
> have
> a separate form just for the uploads or (even better) investigate how
> to integrate
> one of those flash uploaders...
>
>
> On Mon, May 19, 2008 at 5:43 PM, Carlos F  wrote:
> > After trying to async submit a form with a file upload field for a few
> hours I trolled around the message board and JIRA and ran across this:
> >
> > http://issues.apache.org/jira/browse/TAPESTRY-1348
> >
> > Is trying to async submit a form with a file upload field a DEAD END?
> >
> > We tried to add the IFrame transport mechanism . . . however this did not
> trigger the request.  Looking at the code it appears that the IFrame
> transport mechanism does not support async submissions etc.  The tacos bug
> system has a related bug that mentions other changes that may be necessary
> to fix this:
> >
> > http://tacoscomponents.jot.com/BugReporter/Bug62
> >
> > Has anyone been able to successfully async submit a form with a file
> upload field?
> >
> > Carlos
> >
>
>
>
> --
> Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
> Tapestry / Tacos developer
> Open Source / JEE Consulting
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
>

Re: Form - asyn submission with file upload

Posted by Carlos F <ca...@yahoo.com>.
Andreas,

thanks for the reply!

-->  how did you enable the IFrame transport?

i added "dojo.require("dojo.io.IframeIO");" to a script file.  However, this was insufficient.  IframeTransport.canHandle() fails for two reasons:

- the response type that tapestry was requesting was "text/xml" - and as the bug you emailed me notes, that is not a supported format for the IframeIO
- it also appears that the IframeIO also requires the call to be synchronous.  tapestry passes the request as async.

This might be a little naive, but can I avoid the problems the IFrame has with "text/xml" by specify that the response should come as JSON?

Carlos 

Andreas Andreou <an...@gmail.com> wrote: See 

Unfortunately, dojo decided to skip support for XML return types for IframeIO
(which is needed for file uploads) due to problems with making it cross-browser.

What this basically means for Tapestry is that async submit of forms
having files
cannot return the expected xml responses... however, i believe that the requests
do actually take place - how did you enable the IFrame transport?

Another idea (i think someone had mentioned doing this in this ML) is to have
a separate form just for the uploads or (even better) investigate how
to integrate
one of those flash uploaders...


On Mon, May 19, 2008 at 5:43 PM, Carlos F  wrote:
> After trying to async submit a form with a file upload field for a few hours I trolled around the message board and JIRA and ran across this:
>
> http://issues.apache.org/jira/browse/TAPESTRY-1348
>
> Is trying to async submit a form with a file upload field a DEAD END?
>
> We tried to add the IFrame transport mechanism . . . however this did not trigger the request.  Looking at the code it appears that the IFrame transport mechanism does not support async submissions etc.  The tacos bug system has a related bug that mentions other changes that may be necessary to fix this:
>
> http://tacoscomponents.jot.com/BugReporter/Bug62
>
> Has anyone been able to successfully async submit a form with a file upload field?
>
> Carlos
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org



Re: Form - asyn submission with file upload

Posted by Andreas Andreou <an...@gmail.com>.
See http://trac.dojotoolkit.org/ticket/524

Unfortunately, dojo decided to skip support for XML return types for IframeIO
(which is needed for file uploads) due to problems with making it cross-browser.

What this basically means for Tapestry is that async submit of forms
having files
cannot return the expected xml responses... however, i believe that the requests
do actually take place - how did you enable the IFrame transport?

Another idea (i think someone had mentioned doing this in this ML) is to have
a separate form just for the uploads or (even better) investigate how
to integrate
one of those flash uploaders...


On Mon, May 19, 2008 at 5:43 PM, Carlos F <ca...@yahoo.com> wrote:
> After trying to async submit a form with a file upload field for a few hours I trolled around the message board and JIRA and ran across this:
>
> http://issues.apache.org/jira/browse/TAPESTRY-1348
>
> Is trying to async submit a form with a file upload field a DEAD END?
>
> We tried to add the IFrame transport mechanism . . . however this did not trigger the request.  Looking at the code it appears that the IFrame transport mechanism does not support async submissions etc.  The tacos bug system has a related bug that mentions other changes that may be necessary to fix this:
>
> http://tacoscomponents.jot.com/BugReporter/Bug62
>
> Has anyone been able to successfully async submit a form with a file upload field?
>
> Carlos
>



-- 
Andreas Andreou - andyhot@apache.org - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org