dojo的TabContainer中增加的ContentPane如果是closable,如何在关闭后不销毁ContentPane
来源:互联网 发布:网络数字电视无信号 编辑:程序博客网 时间:2024/06/05 20:12
主要思路是新建TabContainer的扩展类,重载其closeChild属性,使得其在关闭子容器时,不调用该子容器的destroyRecursive方法。
define([ "dojo/_base/declare", "dijit/layout/TabContainer"
], function(declare,TabContainer) {return declare("comm.comm.ExTabContainer", TabContainer, {
closeChildAction:"destroy",
closeChild: function(/*dijit/_WidgetBase*/ page){
// summary:
// Callback when user clicks the [X] to remove a page.
// If onClose() returns true then remove and destroy the child.
// tags:
// private
var remove = page.onClose && page.onClose(this, page);
if(remove){
this.removeChild(page);
if (this.closeChildAction=="destroy"){
// makes sure we can clean up executeScripts in ContentPane onUnLoad
page.destroyRecursive();
}
}
}
});
});
然后创建TabContainer的方法如下:
var tc=new ExTabContainer({
style : "height: 100%; width: 100%;",
isLayoutContainer : true,
region : 'center',
closeChildAction:"hide"
});
0 0
- dojo的TabContainer中增加的ContentPane如果是closable,如何在关闭后不销毁ContentPane
- ContentPane
- dojox.layout.contentpane 中addonload的bug
- dijit.layout.ContentPane href加载页面后,被加载页脚本不执行的解决办法
- dojo中AccordionContainer(手风琴)动态添加ContentPane
- 不见光就死的ContentPane:原因及解决之道
- JFrame的层次结构究竟是什么样的,什么又是ContentPane
- JFrame的层次结构究竟是什么样的,什么又是ContentPane()
- dojo学习笔记(六)- ContentPane
- dojo学习笔记(六)- ContentPane
- DOJO之dojox/layout/ContentPane关闭问题:teardown is not a function
- dijit.layout.ContentPane 中的标准方法/事件在不同情况下的调用
- frame添加menu和添加contentpane的方法,放在一起
- 使用dojo中的dijit的组件中TabContainer制作可以关闭的tab
- 解决dojo1.2的ContentPane控件中的内容被padding:5px的问题
- dojo的TabContainer竖排摆放tab标签
- dojo TabContainer部件不显示
- 在不小心关闭浏览器后,如何还能访问关闭浏览器前的session信息
- 二分查找 Java
- UVA - 993 Product of digits 贪心
- Android程序出错:The connection to adb is down, and a severe error has occured
- 第二章 构造/析构/赋值运算符
- Titanium系列之:简介
- dojo的TabContainer中增加的ContentPane如果是closable,如何在关闭后不销毁ContentPane
- 展讯的一道笔试Java题(关于静态初始化问题)
- POJ 1837 - Balance (dp)
- hdu1598find the most comfortable road
- c++ 基础学习
- Android 控件的触摸事件传递与处理
- XMLHttpRequest对象readyState属性
- vc6.0下资源文件/rc文件的使用
- 《数据结构》实验三:栈和队列实验