[Seaside] Re: "Injecting" options into a Magritte description
Esteban A. Maringolo
emaringolo at gmail.com
Tue Oct 1 01:47:33 UTC 2013
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:
descriptionStore
<magritteDescription>
^MASingleOptionDescription new
label: 'Store';
accessor: #store;
beRequired;
options: self currentSession allStores;
yourself
#currentSession
^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.
Regards,
Esteban.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20130930/73025eec/attachment.htm
More information about the seaside
mailing list