Hi,
I read the discussion regarding mediators registration
http://forums.puremvc.org/index.php?topic=1249.msg6484#msg6484 and specially Cliff's remark :
Usually it is the mediator of those view components that will register the mediators for their deferred children, by listening for their creation events.
In a Flex project I'm involved, we experienced that relying on view component's creation events (creationComplete/Initialize) may be limiting in some circumstances:
When more than a single view component is created at once (i.e master/details contents are replaced) and the registered mediators listen to each others notifications, controlling the order of registration is crucial, whereas the order of view component's creation events is unpredictable.
It seems that in these cases it is better for the parent mediator to register child mediators regardless of its view component's life cycle, before it is attached to the display list.
The child mediators should not expect a fully initialized component, but rather a well behaved one (apply to Flex object life cycle and can handle setters before fully created).
Any insights?
Thanks,
-ilan