[Seaside] Serving non-html dynamically
jfitzell at gmail.com
Fri Jul 2 18:20:16 UTC 2010
Note that's 2.8. In 3.0 you would call "self requestContext response"
to get a response object and then use instance-side methods to set it
up as you want. Or
self requestContext respond: [ :response | "set up your response here" ]
You might also like to create a RequestHandler subclass if you are
doing a lot of this and the URLs are more "REST-like" (rather than
doing this in a component).
On Fri, Jul 2, 2010 at 5:24 PM, James Foster <Smalltalk at jgfoster.net> wrote:
> Hi Sven,
> I have occasion to return dynamically generated documents that open in Excel. The following gives the general approach (where 'self returnCSV' is in an anchor callback block):
> | response |
> response := WAResponse
> document: self asCSV
> mimeType: (WAFileLibrary mimetypeFor: 'csv')
> fileName: self caption , ' (' , DateAndTime now printString , ').csv'.
> response doNotCache.
> self session returnResponse: response.
> On Jul 2, 2010, at 1:24 AM, Sven Van Caekenberghe wrote:
>> Does anybody know or can point me to a simple/elegant solution to serving non text/html content dynamically using Seaside ?
>> Say you have a Seaside app that generates dynamic reports in formats like PDF or XLS, how to you generate such an answers ? Serving dynamically generated images like graphs would be another use case.
>> seaside mailing list
>> seaside at lists.squeakfoundation.org
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside