如题,
//往右框架tab页面中加入一项
function addTab(jsfiles,jsObj)
{
    //动态加载js
ScriptMgr.load({ 
scripts:jsfiles.split(","),
callback: function() 

//设置tab项属性
var objTabPanel=eval(jsObj);
objTabPanel.tabPanel.closable=true;
tabs.add(objTabPanel.tabPanel);
tabs.activate(objTabPanel.tabPanel);
tabs.setHeight(tabsHeight);
objTabPanel.jsCallback();
}
});
}

解决方案 »

  1.   

    ......
    menuTree.on('click',function(node){
    if(node.isLeaf()){    
    //Ext.get('content-iframe').dom.src = node.attributes.link+'&node='+node.id; 
    var templink = node.attributes.link;
    var tempCss = node.attributes.iconCls;
    var n = contentPanel.getComponent(node.id);   
                if (!n) { ////判断是否已经打开该面板   
                    n = contentPanel.add({   
                        'id':node.id,   
                        'title':node.text,   
    iconCls: tempCss,
                        closable:true,   
                        autoLoad:{url:templink, scripts:true} //通过autoLoad属性载入目标页,如果要用到脚本,必须加上scripts属性   
                    });   
                }   
                contentPanel.setActiveTab(n);  
              return true;   
          }else{   
      /**  
       *如是不是叶子节点,将展开目录  
       */  
             node.toggle();   
          }       });  

    //右边具体功能面板区   
    var contentPanel = new Ext.TabPanel({   
    region:'center',   
    enableTabScroll:true,   
    activeTab:0, 
    margins:'0 5 5 0',
    items:[{   
    id:'homePage',   
    title:'我的工作台',   
    autoScroll:true,  
    iconCls: 'workPingIconCss',
    autoLoad:{url:"temp3.html", scripts:true} //首页默认的加载页面
    }]   
    }); 
      

  2.   

    因为tab没有reload的方法,
    你要是加载的东西不多的话
    我的建议是不用load
    用ajax加载,
    然后将值赋给你要显示到的控件上,
      

  3.   

    Ext.Ajax.request( {
              url :basePath + 'admin/supervisor.do?key=list&type=supervisorstatistics&week='+week,
               success : function(resp, opts) {
    var respText = Ext.util.JSON.decode(resp.responseText);
    Ext.getCmp('s_weektime').setValue( respText.data.s_weektime);
    Ext.getCmp('s_total').setValue( respText.data.s_total);
    Ext.getCmp('s_ontime').setValue( respText.data.s_ontime);
    Ext.getCmp('s_notontime').setValue( respText.data.s_notontime);
    Ext.getCmp('s_notdo').setValue( respText.data.s_notdo);
               }
    }); // 删除数据后,重新加载
      

  4.   

    tab = this.add({                 id: tabID,                 title : title,                 closable:true,                 autoLoad: autoLoad             }).doLayout();             this.setActiveTab(tab);
      

  5.   

    Buildstores = new Ext.data.JsonStore({
            model: 'Book',
            autoDestroy: true,
            pageSize: pageSize,
            storeId: 'myStore',
            proxy: {
                type: 'ajax',
                url: 'DataPage/BuildPage/GetBuildshow.aspx',
                reader: {
                    type: 'json',
                    id: "id",            },
            }