[Seaside] State shared between components

Lukas Renggli renggli at gmail.com
Sun Mar 30 14:38:59 UTC 2008

>  Since the application contains a lot of components, and the context
>  object is a bit heavy, I've tweaked #register: the following way:
>    WASnapshot>>register: anObject
>       anObject notNil ifTrue: [
>          self at: anObject ifAbsentPut: [ anObject snapshotCopy ]
>      ].
>  is this a valid patch? Or will I run into troubles somewhere else?

It looks fine to me.

You scenario looks plausible. When implementing the #states mechanism
I didn't think that anybody would try to register the same object
multiple times. In Pier for example, this is only the root component
(the one that also instantiates the context with the first request)
that registers it for backtracking. If you have a custom session class
another solution would be to let the session register the context for

Still, it might make sense to add your patch to Seaside 2.9? I don't
know if this is generally useful, as I have never seen such a
situation before.


Lukas Renggli

More information about the seaside mailing list