Uploading files and back button

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Uploading files and back button

Paul Appleby
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: Uploading files and back button

Alessandro  Vernet
Administrator
Hi Paul,

How can we reproduce this? I tried to reproduce this using the XForms
Upload example, modified to use xforms:upload, and it seems to be
working just fine there. See: http://screencast.com/t/MmQxODUzNTA

Alex

On Wed, Mar 31, 2010 at 9:23 AM, Paul Appleby
<[hidden email]> wrote:

>
> Hello.
>
> I have a form that is happily uploading a file using xs:anyURI binding and
> thus storing it as a temporary file in Tomcat.
>
> However, if I then press the back button the form field display the file
> details with a remove cross. If I click 'upload' again there is an error as
> I don't think the file is actually being uploaded again.
>
> I'd quite happily settle for not having the file details and getting back
> the empty field ready for a user to select another file.
>
> I'm using the following:
>
> <xforms:model>
>        <xforms:instance id="files-instance">
>                <parameters xmlns="">
>                        <file filename="" mediatype="" size=""/>
>                        <format>xml</format>
>                </parameters>
>        </xforms:instance>
>        <xforms:instance id="response-instance">
>                <instance xmlns=""/>
>        </xforms:instance>
>        <xforms:instance id="control-instance">
>                <control xmlns="">
>                        <simple-upload-trigger/>
>                </control>
>        </xforms:instance>
>        <xforms:bind nodeset="instance('files-instance')">
>                <xforms:bind nodeset="file" type="xs:anyURI"/>
>        </xforms:bind>
>        <xforms:submission id="background-submission" method="post"
> action="/enriched" instance="response-instance"/>
> </xforms:model>
>
>
> <xforms:upload  ref="instance('files-instance')/file[1]" xxforms:size="60">
>        <xforms:filename ref="@filename"/>
>        <xforms:mediatype ref="@mediatype"/>
>        <xxforms:size ref="@size"/>
> </xforms:upload>
> <xforms:trigger ref="instance('control-instance')/simple-upload-trigger">
>        <xforms:label>Upload File</xforms:label>
>        <xforms:action ev:event="DOMActivate">
>                <xforms:setvalue
> ref="instance('files-instance')/action">simple-upload</xforms:setvalue>
>                <xforms:send submission="background-submission"/>
>        </xforms:action>
> </xforms:trigger>
>
>
> Can someone point me in the direction of a solution?
>
> Thanks
>
> Paul
> --
> View this message in context: http://n4.nabble.com/Uploading-files-and-back-button-tp1747004p1747004.html
> Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet