[Seaside] Lightbox in child component

Michael Lucas-Smith mlucas-smith at cincom.com
Mon Dec 31 06:28:01 UTC 2007


Amos wrote:
>>> Am I missing something really basic, could it be something in my
>>> image, or is this a general problem?
>>>
>>>       
>> Are you sure the parent is holding on to the same instance of the child?
>> If it's not, then the previously "wrapped" component (when you use
>> lightbox, it wraps the component in a decoration) is no longer in the
>> render tree, so the lightbox won't appear.
>>
>>     
> Yes, the instance is the same (within the session at least) - the
> child is held in an instance variable which is initialised in
> #initialize and otherwise doesn't change.
>
> For simplification, let's say I have a MainComponent (which
> canBeRoot), with children HeaderComponent, ContentComponent, and
> FooterComponent. From what you say, should I expect to have only the
> child component that calls #lightbox: to be "wrapped" and display the
> lightbox? What about the case I mentioned where #lightbox: was sent by
> the parent component?
>   
Good point. I guess my only other question is - how is the callback 
happening? If it's an ajax callback then you wouldn't expect it to come 
in for a re-render pass, therefore the lightbox would never appear.

Other than that, it sounds like the scenario is getting kinda weird - 
suggesting that perhaps something is wrong.

Michael


More information about the seaside mailing list