[Seaside] "Injecting" options into a Magritte description
estebanlm at gmail.com
Tue Oct 1 10:41:00 UTC 2013
ah, yes... that looks better :)
And well, is the only way to do it, so I don't think is hacky: you have sessions and session-aware data...
It is more a problem of understanding: your descriptions are not part of the model, are part of your view (in my apps I usually put them into a *MyView category).
On Oct 1, 2013, at 3:47 AM, Esteban A. Maringolo <emaringolo at gmail.com> wrote:
> Answering myself...
> Maybe not an elegant solution (nor a scalable one) but I found I can use the dynamic variable scoping to access the current session.
> I changed my description to use:
> ^MASingleOptionDescription new
> label: 'Store';
> accessor: #store;
> options: self currentSession allStores;
> ^WACurrentRequestContext value session
> It still smells bad, for some reason DynamicVariable's seems "hacky" to me.
> Maybe they're more clever than what I'm used to.
> seaside mailing list
> seaside at lists.squeakfoundation.org
More information about the seaside