-- Mustafa A. Hashmi <mahas...@gmail.com> 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 > intended. > > The working example: > When a tab container is closed, all widgets inside the tab container > get destroyed by default. A very simple implementation: > > http://www.pastebin.ca/1326335 <- the index page. > http://www.pastebin.ca/1326340 <- the href target for the tab. > > This works as expected and I verified that the widget ids are indeed > destroyed when the tab is closed. A simple way to check this is to > simply: javascript:alert(dijit.byId('tabid')); in the browser url > input area. Doing so before the tab is close shows the widget ID, > wherein closing the tab destroys all widgets within. > > The issue: > When using tab containers which are rendered via > $view->tabContainer(..) however, closing the tab does not destory > nested widget ids. I can paste a code example of this if requested, > though it's quite simple to put together. In a nutshell: > > Create a tab with a static ID. Within the tab, open a border container > which consists of a additional content panes. Close the tab and open > it again. I seem to get a widget id collision here. I am using > declarative mark up for dojo and have tried overriding the destroy > function with a call to destoryDescendants() . I also tried doing a > dojo.connect to onClose and passing the tab id and calling > destroyDescendants(), however the widget ID is still available, > whereas the tab has been destroyed. > > 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. -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/