On Fri, Feb 13, 2009 at 7:41 PM, Matthew Weier O'Phinney
<[email protected]> wrote:
> -- Mustafa A. Hashmi <[email protected]> wrote
> (on Friday, 13 February 2009, 07:10 PM +0500):
>> On Wed, Feb 4, 2009 at 11:01 AM, Mustafa A. Hashmi <[email protected]> 
>> wrote:
>> > On Wed, Feb 4, 2009 at 12:04 AM, Matthew Weier O'Phinney
>> > <[email protected]> wrote:
>> > > -- Mustafa A. Hashmi <[email protected]> wrote
>> > > (on Tuesday, 03 February 2009, 11:58 PM +0500):
>> > > > I seem to have hit a strange issue with content panes in tab
>> > > > containers. To ensure the issue is indeed with ZF, or at least my
>> > > > implementation of ZF based tab containers and content panes, I tested
>> > > > dojo's functionality independently and verified that it was working as
>> > > >
>> > > > *snip*
>> > > >
>> > > > Can someone please confirm or deny this? I can pastebin the ZF code if
>> > > > required as well.
>> > >
>> > > Actually, I've run into this using regular dojo markup not generated via
>> > > ZF as well -- it's not specific to ZF generated code. I have it solved
>> > > on one project right now, but have no concrete idea how I got it to
>> > > work.
>> >
>> > Will revert back to the list if I come up with any answers.
>>
>> The only working solution we found was introducing a destroy function
>> in dijit.layout.ContentPane.js. Obviously this is not ideal, however,
>> works quite well.
>>
>> destroy: function() {
>>     // summary:
>>     //      adding destory to contentpane.
>>    dojo.forEach(this.getDescendants(), function(widget){
>>        widget.destroyRecursive();
>>     });
>>
>>     this.inherited(arguments);
>> },
>
> Actually... this makes sense. I ended up doing the same thing in my
> code, but failed to attribute my success to that.
>
> When reading through the dojo code itself, there's two things I noted.
> First, the content pane's destroy() method inherits from dijit._Widget,
> and that method does not do a destroyRecursive() -- leaving any dijits
> inside still intact, but no longer attached anywhere in the DOM (this is
> why your method of connecting to destroy() and calling that works).
> Second, I discovered that destroyRecursive() has a note that says, "this
> will not work with dijit._Templated widgets" - and while ContentPane may
> not be one, you may have issues if children of ContentPane are.

Ah -- thank you! Appreciate you tracing the issue all the way.

Regards,
Mustafa.

Reply via email to