If you set the "Content-Disposition" header in the response you can.

Add this to your page:

@Inject
private RequestGlobals requestGlobals;

Then somewhere before you return the stream response, do

requestGlobals.getResponse().setHeader("Content-Disposition",
"attachment; filename=" + <filename>);

Also, you could create your own StreamResponse implementation, or extend
the existing TextStreamResponse, and do that in the "prepareResponse"
method, if that way is more convenient.

Cheers,
Carl

Otho wrote:
> Hello all,
> 
> by defaullt a TextStreamResponse when meant to be saved on disk gets a
> filname composed of <classname.methodname> for example
> 
> export.customers
> 
> Is there any way to override that to something like export_customers.csv
> without having to rename classes and methods accordingly?
> 
> Regards,
> Otho
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to