Results 1 to 3 of 3

Thread: on closing a tab and then opening it again the content is gone

  1. #1

    Default on closing a tab and then opening it again the content is gone

    Hi all,

    Simply said when clicking an link i create an tab and put content into it.
    When i close this tab and i open it again.
    theres no content in the tab.
    I tried addLayout and several other options ,using closeAction hide or close,
    deferredRender , etc

    but i dont get it to work and i mustve had atleast 10 coffees today.

    the code
    Code:
     
    Ext.EventManager.addListener("supplier_tree",'click',function(){
     
    
    
    var json2 =[{"text":"Supplier Management","id":100,"leaf":false,"cls":"folder","children":[
    {"text":"add supplier","id":1000,"leaf":true,"cls":"folder"}, {"text":"supplier overview","id":2000,"leaf":true,"cls":"folder"}]} ]; if(!Ext.get('static_supplier_menu')){ var tree2 =new Ext.tree.TreePanel({ id:'static_supplier_menu',
    animate:true, enableDD:false, loader:new Ext.tree.TreeLoader(), lines:false, border:false, renderTo:'supplier_tree_div', root:new Ext.tree.AsyncTreeNode({ text:'Suppliers', draggable:false, id:'source', children: json2 }),
    rootVisible:true,
    });
    tree2.on("click",function(node, e){
    switch(node.id) { case1000: if(Ext.getCmp('apptabs').findById('number_management_id') && Ext .getCmp('apptabs').findById('number_management_id').isVisible()){
    return;
    } else{
    Ext.getCmp('apptabs').add({
    layout:'form',
    resizable:true, closable:true, id:'number_management_id', title:'Supplier management', items:[saveSuppliers] });
    Ext.getCmp('apptabs').setActiveTab('number_management_id');
    Ext.getCmp('apptabs').findById('number_management_id').doLayout(); }
    break; } }); }else return;
    },this,{ preventDefault:true});

  2. #2

  3. #3

    Default thanks

    Hi thanks for the headsup , i was playin around with it.

    Code:
    xtype:'tabpanel',
    			activeTab:0,
                region:'center',
                margins:'90 5 5 0',
    			//deferredRender: false,
      layoutOnTabChange: true,
    autoDestroy:false,
    //forceLayout: true,
    			//autoHeight:true,
    			//resizable:true,
    			id:'apptabs',

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •