[Seaside] rendering in a class hierarchy, part 2
stephan at stack.nl
Sun Nov 8 13:58:37 UTC 2009
Using Announcements could use some extra detailed explanations:
Create an Announcement subclass
Create a subclass of WASession having an announcer instance variable
and lazy initialized getter
^announcer ifNil: [announcer := Announcer new]
This announcer handles the session specific announcements. You might
an application one to handle session-to-session announcements, or
component specific ones to handle very complex interactions.
In MADefaultDetailDisplay, you create a method:
self session announcer announce:
that you calll somewhere in the component, e.g.:
html form: [
on: #somethingInterestingHappened of: self]
In your page you subscribe in initialize to this Announcement:
details := MADefaultDetailDisplay new.
self session announcer
send: #switchToOtherDetail to: self
" add handling other details"
detail := MAOtherDetailDisplay new.
More information about the seaside