[Seaside] What's the difference and why??
Brian Brown
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:
children
^ 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):
renderContentOn: html
html heading: 'Welcome to my world' level: 3.
self session loggedUser isNil
ifFalse: [
html div
class: 'navigation';
with: [html render: navWidget]
html div
class: 'mainPage';
with: [html render: mainPage].
html div
class: 'footer';
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 ;)
Brian
On Feb 28, 2006, at 5:57 PM, Ramon Leon wrote:
> You need to return loginArea from children.
>
> 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].
>>>
>>> if
>>>
>>> initialize
>>> loginArea := loginClass new.
>>>
>>> loginArea
>>> ^loginArea.
>>>
>>> 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
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
More information about the Seaside
mailing list