[Seaside] how to get dynamic files?

James Foster Smalltalk at JGFoster.net
Wed Feb 25 04:19:28 UTC 2009


Hi Oleg,

Here is how I return dynamic content:

renderContentOn: html

	html anchor
		callback: [self returnCSV];
		with: 'Export CVS file to Excel';
		yourself.

returnCSV

	| response |
	response := WAResponse
		document: self asCSV
		mimeType: (WAFileLibrary mimetypeFor: 'csv')
		fileName: caption , ' (' , DateAndTime now printString , ').csv'.
	response doNotCache.
	self session returnResponse: response.

Hope that helps,

James Foster

On Feb 24, 2009, at 5:02 PM, Oleg Korsak wrote:

> Hello!
>
> My method in a WAFileLibrary subclass returns dynamic contents  
> (composes
> it on the fly). But when I'm trying to download it (no matter how many
> times) - the contents is the same as in the begining. Is it possible  
> to
> get a dynamically created file from WAFileLibrary so it could be
> different for each request?
>
> Thanks.
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list