[Seaside] What's the difference and why??
rbb at techgame.net
Wed Mar 1 04:49:13 UTC 2006
Yes, I meant to put that in my response, but forgot to.... you need
to implement the #children message on MyWebApp like:
^ Array with: menuArea with: mainPage with: loginArea
Also, What I do now for login is like so (this is 2.6 Canvas
rendering syntax, but you get the idea):
html heading: 'Welcome to my world' level: 3.
self session loggedUser isNil
with: [html render: navWidget]
with: [html render: mainPage].
with: [html render: loginWidget].
So the footer always gets rendered, but if there is no valid session
user, then the navWidget and mainPage do not get rendered.
I've been meaning to publish my login widgets and such, but haven't
gotten around to it yet ;)
On Feb 28, 2006, at 5:57 PM, Ramon Leon wrote:
> You need to return loginArea from children.
> ^Array with: loginArea
>> -----Original Message-----
>> From: seaside-bounces at lists.squeakfoundation.org
>> [mailto:seaside-bounces at lists.squeakfoundation.org] On Behalf
>> Of Rick Flower
>> Sent: Tuesday, February 28, 2006 5:33 PM
>> To: The Squeak Enterprise Aubergines Server - general discussion.
>> Subject: Re: [Seaside] What's the difference and why??
>> Brad Fuller wrote:
>>>> renderContentOn: html
>>>> html divClass: 'sidebar' with: [html render: menuArea].
>>>> html divClass: 'contentarea' with: [html render: mainPage].
>>>> html divClass: 'loginarea' with: [html render: loginArea].
>>>> where loginArea is an instance of a Login class
>>> you can also do, for instance:
>>> html divClass: 'sidebar' with: [self loginArea].
>>> loginArea := loginClass new.
>>> But, is that not a good way to go?
>> You've got me on that one -- for me, the first one seems to
>> be easier to understand for me anyway.. Perhaps someone else
>> can chime in the validity of the bottom one..
>> Seaside mailing list
>> Seaside at lists.squeakfoundation.org
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
More information about the Seaside