简体   繁体   中英

when click on node in tree panel then active tab reload in tabpanel in extjs 4

I am new to extjs 4, I have one tree panel and one tabpanel, in tabpanel I have 4 tabs, those four tabs are ajax tabs, now my task is when I click on node in tree panel that's time tabpanel is reload that is my task so please help me below code is tree panel

var treePanel = Ext.create('Ext.tree.Panel', {
    id: 'tree-panel',
    title: 'Taxonomy',
    region: 'west',
    collapsible: true,
    split: true,
    height: '100%',
    width: '20%',
    minWidth: 100,
    rootVisible: false,
    autoScroll: true,
    store: store,
    viewConfig: {
        plugins: {
            ptype: 'treeviewdragdrop'
        }
    },
    listeners: { //this listeners i am used for active tab reload but not working .
        select: function (s, m) {
            IPRadarPanel.setActiveTab(m.raw.TabPanel);
        }
    },   

below code is tabpanel code

var IPRadarPanel = Ext.create('Ext.TabPanel', {
    deferredRender: false,
    id: 'IP_RadarPanel',
    // region: 'North',
    plain: true,
    split: true,
    activeTab: 0,
    items: [{
        title: 'State of patent record',
        bodyPadding: 10,
        autoScroll: true,
        loader: {
            url: 'charts/states.php',
            scripts: true,
            //scripts:true,
            contentType: 'php',
            // loadMask: true
            autoload: true
        },
        listeners: {
            activate: function (tab) {
                tab.loader.url = 'charts/states.php?id=' + treeID;
                tab.loader.load();
            }
        }
    },
                                if(tabPanel.activeTab.title == "IP Radar"){
                                IPRadarPanel.activeTab.fireEvent("activate", IPRadarPanel.activeTab);
                                }else{
                                //tabPanel.activeTab.fireEvent("activate", tabPanel.activeTab);
                                }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM