[Seaside] session variable vs. dynamic variable
ramon.leon at allresnet.com
Fri Feb 8 15:37:05 UTC 2008
> I am using a session variable for my sub-component callbacks
> to gain access to a root component (to trigger an ajax
> redraw). As Lukas had cautioned, this couples my components
> to a session subclass and makes it harder to reuse my components.
> Two questions:
> 1. If WASession had an extensible dictionary of variables
> would it help?
> What is the downside of doing that?
> 2. If I decide to use a WADynamicVariable instead, when
> should I bind it?
> Within my root #renderContentOn? And will subcomponent
> callbacks see that binding?
> WADynamicVariable subclass: CurrentRoot ...
> MyRoot>>renderContentOn: html
> CurrentRoot use: self during: [
> render self and children
> CurrentRoot value ...
> Thanks - Sophie
Use announcements instead, break the coupling.
More information about the seaside