[Seaside] What's the difference and why??

Brian Brown rbb at techgame.net
Tue Mar 14 16:31:20 UTC 2006

On Mar 14, 2006, at 12:40 AM, Rick Flower wrote:

> Brian Brown wrote:
>> Hi Rick - let's step back for a sec and talk about a different  
>> structure....
>> :)
>> questions!
> Brian,
> Just one more question.. I've got an "about" page that is called as  
> shown directly above (using #call) and it works fine,
> but I'd like for that page to be able to render the contents of the  
> same menu area class (menuArea object from above)
> as the parent object does and am wondering about the best way to do  
> that.  I figure I've got two possible ways to do it
> -- one would be to add an "on: " method to my About class so the  
> parent class can register its instance with the
> aboutPage object at creation time (pros: only one menuArea object),  
> or I can just create another instance of the
> menuArea everytime the About page is pulled up.. Is there another  
> way to do this?  Thanks!
> -- Rick

Try thinking of your main entry point (what I referred to as MyWebApp  
in the example) as box with dividers in it, and your other components  
are the things that fit into those divided spaces.  So things like  
mainPage, enrollPage, aboutPage etc. get rendered into one of those  
divided spaces, likely the biggest space. aboutPage, for example,  
doesn't render a menu. The menu is rendered as a peer to it in a  
different "divided space". This follows what I had put in before by  
way of example for MyWebApp>>renderContentOn:

> renderContentOn: html
>     html divClass: 'sidebar' with: [html render: menuArea].
>     html divClass: 'contentarea' with: [html render: mainPage].

the thing that initially gets rendered inside of the div  
'contentarea' get's replaced by the menu calls; mainPage doesn't  
render any menus, and when the menu sends the #call: message to  
mainPage for say, aboutPage, the menu stuff is still rendered in the  

Is this making any sense?


More information about the Seaside mailing list