Joffrey, I think you might find qx.ui.embed.Ifrme useful for your purpose.
Derrell
On Mon, Nov 15, 2010 at 09:38, Derrell Lipman <
[email protected]> wrote:
> On Mon, Nov 15, 2010 at 09:21, Joffrey Fuhrer - NOVLOG <
> [email protected]> wrote:
>
>> Hmmm... You don't want the app to put its hands on the response. So what
>> do you want to happen with that response? Do you want it displayed
>> someplace? You could create an Iframe and set the Iframe's src attribute so
>> that the file gets loaded into that Iframe, but if the file is a CSV file
>> and not HTML, it won't render properly. All of the newlines will become
>> single spaces, and the whole thing will end up on one messy line. If the CSV
>> file is preprocessed at the server to instead be HTML that displays
>> comma-separated values and then has a <br> tag, you'd get the proper
>> appearance, but it's no longer downloading a CSV file.
>>
>> If the data needn't be displayed, then the former idea may actually
>> work. If the data is coming from the same origin as your application, you
>> then, I believe, have access to the Iframe's data (via innerHTML? I don't
>> recall) and can extract it. But you said you don't want the application
>> involved, so I still don't understand your goal here.
>>
>> Derrell
>>
>>
>> No, I don't need to display the data on the screen: in the end,
>> I want the application user to have a "whatever.csv" file on his
>> filesystem that he'll be able to open with whatever application he wants
>> to
>> use: Excel, opencalc, google docs... Just as if I provided him with a link
>> like http://hello-world.com/whatever.csv
>>
>>
> Ok, then I think you're really outside of the qooxdoo domain. You want the
> browser to open up the Save File As dialog to allow the user to save the
> file. I think you should be able to do that with an Iframe most easily
> without doing anything with qooxdoo. I've never actually tried to do what
> you're attempting, though, so I don't have explicit instructions for you.
>
> I believe you'll have to arrange for the server to provide a MIME type that
> the browser doesn't know what to do with, in order for the browser to open
> that Save As dialog. If you send the CSV file back as text/plain, the
> browser will likely just render it in the Iframe. Sending it as
> application/something may be appropriate, but I'm not sure of the best way
> to handle this.
>
> Derrell
>
>
------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel