[Seaside] contentType:

Avi Bryant avi.bryant at gmail.com
Wed Jan 4 21:06:03 CET 2006


On Jan 4, 2006, at 12:03 PM, Ramon Leon wrote:

> Hi, I notice I can get at the current request from a component by
> calling self session currentRequest, but how do I get at the current
> response to change the contentType?  Say I want to have a component
> render as contentType: 'text/xml', or a component render as  
> contentType:
> 'application/vnd.ms-excel'?

Do you really want to have a component render as one of those content  
types?  Seems more likely that you'll want to generate those  
responses in some other way... from within a callback, you can use  
WASession>>returnResponse: to return a WAResponse instance that you  
have built from scratch with whatever content type you like.

Avi


More information about the Seaside mailing list