[Seaside] Menu building pattern?
C. David Shaffer
cdshaffer at acm.org
Wed Aug 4 09:13:51 CEST 2004
I have been working on a generic menu component and I'm stumbling on
managing children. What I'd like to do is after callback processing is
complete (and the component tree is finalized for the next rendering
pass), traverse the tree and ask each visible presenter for its menu
items. The menu items themselves are components so they have to appear
in the menu's response to #children during the next render loop
iteration. I've made several false starts and I'm getting myself
confused. One thing that I thought might work was to change my menu
into a decoration of the root component and then to have it override
WAPresenter>>processCallbackStream: as such
processCallbackStream: aCallbackStream
super processCallbackStream: aCallbackStream.
self rebuild
where rebuild just uses "owner visiblePresentersDo: " to walk the
presenter list and build the menu items. I end up with unprocessed
callbacks whenever I trigger the menu items' links. Am I thinking about
the order of things correctly here? Anyone doing anything like this?
David
More information about the Seaside
mailing list