>>>> "Jason" == Jason Johnson
<jason.johnson.081(a)gmail.com> writes:
Jason> Isn't there some kind of component that breaks things into different
Jason> pages? If not, then this page has some good information:
Jason>
http://onsmalltalk.com/programming/smalltalk/using-magritte-with-seaside/
Oooh... I may have stumbled on that already, but I ended up recreating
parts of it for what seems to be working now. The MAAccessor info looks
like it'll help solve the next problem I have though. Yeay.
Jason> In Magritte we can customize as high up as we want. My plan right now
Jason> is simply not use #asComponent for display, but instead have a
Jason> asAComponent for one site and asBComponent for another. Each one
Jason> would select a different set of descriptions as described in the link
Jason> above.
Yeah, here's what I came up with in my WATask'ish thing:
MyTask>>go
self call: self page1Component.
self call: self page2Component
MyTask>>page1Component
| result |
result := model asPage1Component.
"tweak description for this view"
result description componentRenderer: MACssRenderer.
result description attributes addClass: 'specialclass'.
"tweak view"
result
addValidatedForm;
addDecoration: (WAMessageDecoration new message: 'page 1'; yourself).
^result
(page2 component is similar)
MyModel>>asPage1Component
^MAContainer new
add: self descriptionField1;
asComponentOn: self
MyModel>>asPage2Component
^MAContainer new
add: self descriptionField2;
addAll: self descriptionsField3; "might return 0..n items"
add: self descriptionField4;
asComponentOn: self
I'm trying to keep the "view" tweaks in the Task, because I think the task
should own how the container is rendered, although I think the subcontainers
will probably define their own viewish flavors without help. I may rethink
this later. :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn(a)stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See
PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!