[Seaside] Application level state

Bernhard Pieber bernhard at pieber.com
Thu Jul 20 17:50:38 UTC 2017

Hi Philippe,

Thanks for the reply. It is the business model of the application. Now I have a class called BpApplicationModel with a class variable default. On my components I have the following method:

	^BpApplicationModel default

I want to register the same application twice under different context paths using different BpApplicationModel instances. I could solve this with a dictionary singleton with the WAApplication as the key. However, it seems easier and cleaner if I could implement something like:

	^self session application model


> Am 20.07.2017 um 13:13 schrieb Philippe Marschall <philippe.marschall at gmail.com>:
> On Wed, Jul 19, 2017 at 6:39 PM, Bernhard Pieber <bernhard at pieber.com> wrote:
>> Hi all!
>> I have subclassed WASession to add my own session specific state. I would like to do the same for WAApplication. However, I have read in the mailing list that WAApplication is not supposed to be subclassed.
>> I tried using preferenceAt:put: to set my root model object. However, I get WAAttribute not found. This feature seems to be for configuration purposes, mostly simple data types and classes.
>> So far I used the singleton pattern, a class variable in my root object model class. But now I would like to register the same component class twice using different context paths.
>> What is the most idiomatic way to achieve this in Seaside?
> Can you go a bit into the details of the state? Is that more
> configuration is nature or more a business model?
> Cheers
> Philippe
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside

More information about the seaside mailing list