[Seaside] How to do the ubiquitous home button?
tblanchard at mac.com
tblanchard at mac.com
Fri Aug 8 16:20:29 CEST 2003
I decided to stick whatever I want to call home in the session and have
goHome in session do the clearDelegate.
Works nice!
Thanks.
On Friday, August 8, 2003, at 02:27 PM, Avi Bryant wrote:
>
> On Fri, 8 Aug 2003 tblanchard at mac.com wrote:
>
>> I've got a page that wants to have a link on every page back to home.
>> The app has the concept of logging in which provides access to certain
>> features but other features don't require logging in. If I didn't
>> have
>> to track the that user had logged in I'd just use a raw url and let
>> them get another session. But I have to keep track of who is logged
>> in
>> (if anyone).
>>
>> The better behavior would be to backtrack until the page is the home
>> page (ie - recover to the last home page view).
>>
>> Suggestions for a general solution? (I could do custom implementation
>> of this button on each page but I'd rather not).
>
> - Create a frame component, and set it as your entry point. This
> should
> have a 'contents' ivar which holds the home component. Its
> #renderContentOn: should look, minimally, like
>
> renderContentOn: html
> html anchorOn: #home of: self.
> html render: contents
>
> - Add a #home method which looks like this:
>
> home
> contents clearDelegate
>
> This will clear away the #call: chain and snap you back to the original
> component.
>
> That make any sense?
>
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/listinfo/seaside
>
More information about the Seaside
mailing list