cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <>
Subject Re: Save pipeline results on client
Date Tue, 22 Feb 2005 14:18:08 GMT
Nick Goupinets wrote:
> Hi Kjell Arne,
> Thank you very much for your reply. That was pretty quick :).
>> I don't think you will be able to save anything programatically to
>> the client machine from the browser. 
> Yes, I am aware of that, but thank you for reminding.
>> I know of only two options or workarounds. Either you have to instruct 
>> the
>> user to save the whole document from the file menu, 
> Oh, I wish the customer was that compassionate and understood the 
> hardship of being a developer. :)
>> or you can use a Flash
>> swf or Java applet/program. At least you would have some possibility 
>> to save
>> to the client's hard disk.
> This is not an option, as I don't think I am allowed to introduce any 
> extra requirements to the browser (i.e. having flash/applet viewer 
> installed).
> Instead I wanted something like sourceforge downloads. You know when you 
> click on "download" link, the same page is still displayed in the 
> browser, but then a few seconds later "Save file" dialog box pops up, 
> that lets you save the selected file to the disk (this sentence really 
> gets me nailed, as it's not a Cocoon question - more like a 
> JavaScript/browser one).
> AFAIK such functionality can be accomplished by setting refresh meta tag 
> in the header of the html page. It's "nice-and-easy", but I can't do 
> that either, as what I am working on will be used in cocoon portal 
> (which I think strips out all the html/head/body tags by default (for 
> cachingURIcoplets), and it doesn't look right to hack the skin to allow 
> for this one case).
> So the problem are these:
> 1) which mime type needs to be selected for the serializer so that 
> browser doesn't show the result but rather prompts to save it. Is it ok, 
> if I put something that I know is not supported i.e.
> <map:serialize
>    type="xml"
>    mime-type="application/my-not-supported-type"/>
You do not do it via mime-type but via an appropriate http header 

still as the article say - you might have the problems with bad behaving 

> 2) how to make sure that a new window is not opened, and the old one 
> stays unchanged and the save-as dialog is still showed? (looks like an 
> impossible task to me)
You need to open a new window. still you can provide some ways in client 
side JS to close it conveniently.

Leszek Gawron                                                 MobileBox                    

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message