Ticket #5648 (closed defect: fixed)
ContentPane: child widget not started after parent.refresh() or setHref() call
| Reported by: | StefanVE | Owned by: | bill |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1 |
| Component: | Dijit | Version: | 1.0 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by bill) (diff)
If you load a template containing TabContainer into a contentPane (href or setHref()) it works fine the first time. But if you do a contentPane.refresh(), or a new setHref(), the tabs are no longer there. Other widgets in the template are parsed, but not the tabs. Calling tabContainer.startup() and tabContainer.resize() makes them appear again (thanks psychcf). Calling destroyRecursive() on tabContainer or destroyDescendants() on contentPane prior to loading a new tabcontainer does not help.
Testcode:
main.htm
<div id="fake" dojoType="dijit.layout.ContentPane" href="_tabContainer.htm">
</div>
<div onclick="dijit.byId('fake').refresh()">Refresh tabs</div>
<div onclick="fixIt()">Run fix</div>
<script>
function fixIt(){
dijit.byId('mainTabContainer').startup();
dijit.byId('mainTabContainer').resize();
}
</script>
_tabContainer.htm
<div id="mainTabContainer" dojoType="dijit.layout.TabContainer"> <div dojoType="dijit.layout.ContentPane" title="Tab 1" id="tab1">Content always visible</div> <div dojoType="dijit.layout.ContentPane" title="Tab 2" id="tab2">But the tabs not...</div> </div>
Attachments
Change History
Note: See
TracTickets for help on using
tickets.