[Seaside-dev] correction

Julian Fitzell jfitzell at gmail.com
Fri Sep 11 08:36:36 UTC 2009


On Thu, Sep 10, 2009 at 10:20 PM, Philippe Marschall
<philippe.marschall at gmail.com> wrote:
> 2009/9/10 Robert Shiplett <grshiplett2 at yahoo.com>
>>
>> Philippe
>>
>> I don't want to argue about the implementation of  WARenderer<<default
>>
>> I mis-typed:  WARenderCanvas is the HTML subclass ...
>>
>> Other continuing examples of issues with MimeType:
>>
>> WAResponseGenerator>>pageExpired
>> "The page is no longer in the cache and the request could not be processed."
>>
>> self response
>>    doNotCache;
>>    contentType: WAMimeType textPlain;
>>    nextPutAll: 'This page has expired, please use the back-button to navigate to the last   valid page.'
>
> Just make a subclass, override the methods (see
> WAHtmlResponseGenerator) and make the #responseGenerator setting on
> your application point to your class.

Indeed. The whole point of WAHtmlResponseGenerator is that you can use
your own subclass to generate whatever content you want. So the
default is text... what the heck else would it be? There's no point
making the mime type separately configurable because if you change the
mime type, you're going to want to change the content as well.

As for WARenderer>>default, that's a convenience method to make it
easier for people to get started. I *strongly* encourage everyone to
implement #rendererClass on their own components (ideally on a
superclass of their components so it's in one place) to ensure that
their components continue to work no matter what renderer might be the
default in the future. But of course this can also be done
retroactively if the default ever does change. Again, it is *by
design* that you can specify whatever renderer you want for your
component. The fact that there is a default of an HTML renderer does
not mean that the framework is hardcoded to HTML.

Julian


More information about the seaside-dev mailing list