Re: WOSwitchComponent question
Re: WOSwitchComponent question
- Subject: Re: WOSwitchComponent question
- From: Andrew Lindesay <email@hidden>
- Date: Fri, 23 Oct 2009 07:51:03 +1300
Hi Katya;
The component that is actually switched seems to behave "quasi-
stateless" to me, but the tree of components below the switched one
seems to behave statefully. Maybe the awake() is issued to all of the
past sub-components of the switch in case the switched component
changes in the request-response cycle? I make quite heavy use of
switch component, but generally try to steer away from awake() and
sleep() so I haven't really noticed this before. Here is a case where
source-access would be helpful. Anyway; thank you for alerting to this!
cheers.
The workaround is not what my initial e-mail was about - the reason
for this behaviour is what was bothering my colleague and me. After
spending some time investigating the issue it turned out that all
components that have at some point occupied the WOSwitchComponent
are registered as subcomponents in the component that contains the
switch. These components are not removed from the subcomponents list
once they're no longer displayed and get awaken in the component's
_awakeInContext(...) method. I'm not sure whether this is a bug, but
it's definitely something to keep in mind when using
WOSwitchComponent.
___
Andrew Lindesay
www.lindesay.co.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden