[Seaside] Rendering in a class hierarchy
jfitzell at gmail.com
Sun Nov 8 21:16:43 UTC 2009
On Sun, Nov 8, 2009 at 5:05 AM, Philippe Marschall
<philippe.marschall at gmail.com> wrote:
> 2009/11/8 Stephan Eggermont <stephan at stack.nl>:
>> Ok. The basics. Your page renders four parts:
>> renderContentOn: html
>> self renderHeaderOn: html.
>> self renderMenuOn: html.
>> self renderSynopsisOn: html
>> self renderDetailsOn: html.
>> The first three parts are rendered directly,
>> all similar to this one:
>> renderheaderOn: html
>> html div
>> class; 'pageHeader';
>> with: 'Header'
>> the details component changes, and is tracked
>> in the detail instance variable of your page.
>> renderDetailsOn: html
>> html div
>> id: 'DetailDisplay';
>> with: [
>> html render: details]
>> In the initialize, you have a default detail.
>> super initialize.
>> details := MADefaultDetailDisplay new.
>> The detail is a child.
>> ^Array with: detail
>> When you use Announcements:
>> The detail component posts an Announcement when
>> something happens that a page might be interested
>> in. The page subscribes (in initialize) to the Announcements
>> it is interested in.
> way to go
Yup, great code sample.
More information about the seaside