Opened 13 years ago
Closed 13 years ago
#10189 closed defect (worksforme)
AccordionContainer
Reported by: | Jean-Pascal Laux | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | Dijit | Version: | 1.3.2 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
I found a bug in AccordionContainer. When I destroy an AccordionContainer and recreate later a new AccordionContainer with the same Id, I get the content of each child container at the same time and no headers have been displayed. This bug still exists in the version 1.3.2. I have looked at the code and have found the error (I changed the code and it is OK)
The function in cause is :
destroy:function(){ dojo.forEach(this.getChildren(),function(_b){ _b._buttonWidget.destroy(); });
the code is right except that this function should be named destroyRecursive to work correctly
Change History (2)
comment:1 Changed 13 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 13 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Please attach a test case using the attach file button.
The destroy() code you quoted is correct. AccordionContainer.destroy(), as specified in the definition of destroy() in _Widget.js, is supposed to destroy the AccordionContainer but not the children, where "children" means the underlying ContentPanes. The buttons, however, are part of the AccordionContainer and should be removed in the destroy() call.