Ext.TabPanel和contentEl组合使用时.关闭一个tab然后再次打开报错的问题~~

目前我有一个TabPanel.假设当前有两个Tab好了.tabA和tabB.


我是通过触发别的点击的将tabA和tabB加入进来的,加入的时候没问题,是OK的.
Js代码 复制代码
Js代码 复制代码
当前我还没想到好的解决办法.请GG们给我点明示...
 
--------------------------------------------------------------高手们的解答--------------------------------------------
2009-08-26 yourgame (资深架构师)
你在success里面判断tab页存在与否,如果不存在则创建之激活之,否则激活则以,而后渲染到tab页的body即可,不需要contentEl属性,contentEl 就是 panel.body,你也可以这样阿
Js代码 复制代码

你只要保证渲染报表的时候tab页是存在的,把渲染和创建tab页放到一个方法中去就可以了.
 
 
-----------------------------------------------------------------------------------------------------------------------------
你的猜想是正确的.
1.contentEl : String
Specify the id of an existing HTML node to use as the panel's body content (defaults to '').
Description :
This config option is used to take an existing HTML element and place it in the body of a new panel (it simply moves the specified DOM element into the body element of the Panel when the Panel is rendered to use as the content (it is not going to be the actual panel itself).

2.再来看看TabPanel的源码,
close操作会触发remove事件,然后调用onRemove方法,
Javascript代码 复制代码

 

  
你为啥要chart.render("divA"); 呢?
把这个chart封装成一个FlashComponent(ext3.0),然后放入Panel不就ok了?
 
 
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值