Jason,
this is exactly what I was thinking of. My question is how to do this
part: "have a field that contained the serialized rpc style data"? How
can I rpc-serialize it?
BTW I want to download the file not to upload it. So I will not need
to decode on client, only encode on client and decode on server
On 6 ноя, 20:16, Jason Essington <jas...@GreenRiverComputing.com>
wrote:
> Actually, the process would be to construct a form post (not a XHR)
> since that is the only way in Javascript/html to upload a file. you
> could have a field that contained the serialized rpc style data ...
>
> then on the server break out the fields ... handle the files and
> deserialize the other bits. then serialize a response and return it.
>
> on the client, the target iframe would have to handle the returned
> text as RPC data and deserialize it.
>
> I don't think that any of this is built into GWT at the moment, but it
> would be possible to create it.
>
> I have created form posts with RPC responses in the past, so it is a
> short hop to add the rpc style request parameters.
>
> -jason
>
> On Nov 6, 2009, at 6:48 AM, Sripathi Krishnan wrote:
>
> > Can't do it via GWT RPC. As you said, you can bypass things on the
> > server, but GWT doesn't have any client side hooks to get raw bytes.
>
> > In fact, I am not sure if you can do that using a XmlHttpRequest.
> > How will the user save the file, if the data is available as a
> > javascript variable?
>
> > There is an older discussion on this group - someone wanted to
> > download an image from the servlet but pass in parameters using GWTs
> > RPC request. The conclusion was similar - it can't be done.
>
> > --Sri
>
> > 2009/11/6 Andrey <
razumovsky.and...@gmail.com>