1. #1
    Sencha User
    Join Date
    Jun 2011
    Location
    Bangalore, India
    Posts
    145
    Answers
    3
    Vote Rating
    1
    renganathan is on a distinguished road

      0  

    Default Unanswered: Problem with two treepanel with same store - help needed

    Unanswered: Problem with two treepanel with same store - help needed


    Hi everyone,

    i am using two tree panels using same store . The tree nodes are visible in both the panels, when accordion is expanded , but only the last tree panel tree nodes are expanded up to the leaf node. The first tree panel nodes are not expanded.

    But if i use different tree stores, the tree nodes are expanded correctly up to the leaf node.

    This seems to be a bug but can you guys suggest if there is any workaround for this problem?

    i have shared my code for tree store , panels & accordion


    Code:
    // tree store
    
    var lab = "";
    var org = "";
    var  ipaddr = "";
    var treestore = Ext.create('Ext.data.TreeStore',  
    {
    autoLoad : true,     
    proxy : 
    {
    type : 'ajax',
    url :  'labtree.php',
    actionMethods: { create: 'POST', destroy: 'DELETE', read:  'POST', update: 'POST'}
    },
    root : 
    {
    id : '0',
    expanded :  true
    }
    });



    Code:
    // 1st tree panel
    var profileTree = new Ext.tree.TreePanel(
    {
     title : 'My Profile',
     id : 'profileTree',
     lines : true,
         containerScroll : true,
     autoScroll : true,
         frame :true,
     store : treestore,
         rootVisible : false,
     stateful : false,
    listeners : 
    {
    itemclick  : function clickListener (view, rec, item, index, eventObj) 
    { 
    lab = rec.raw.chain['lab'];
    org = rec.raw.chain['org'];
    ipaddr = rec.raw.chain['ipaddr'];
    
    dstore.load(
    {
    params:
    {
    lab : lab, 
    org : org,
    ipaddr : ipaddr,
    start : 0
    }
    });
    Ext.getCmp('gridPan').getView().refresh();
    }
    }
    });  
    
    // second tree panel
    var navTree = new Ext.tree.TreePanel(
    {
     title : 'My Selected Labs',
     id : 'navTree',
     lines : true,
         containerScroll : true,
     autoScroll : true,
         frame :true,
     store : treestore,
     stateful : false,
         rootVisible : false,
    listeners : 
    {
    itemclick  : function clickListener (view, rec, item, index, eventObj) 
    { 
    lab = rec.raw.chain['lab'];
    org = rec.raw.chain['org'];
    ipaddr = rec.raw.chain['ipaddr'];
    
    dstore.load(
    {
    params:
    {
    lab : lab, 
    org : org,
    ipaddr : ipaddr,
    start : 0
    }
    });
    Ext.getCmp('gridPan').getView().refresh();
    }
    }
    }); 
    
    //accordion 
    var navPanel = new Ext.Panel(
    {
    split :true,
    title : "nav panel",
    layout :'accordion',
    items : [navTree, profileTree]
       });
    Your help will be appreciated

    Thanks in advance
    Thanks,

    RENGANATHAN M G

  2. #2
    Sencha User
    Join Date
    Oct 2011
    Posts
    17
    Vote Rating
    0
    Gummy is on a distinguished road

      0  

    Default


    I have the same problem, it seems you can't use the same treestore for different treepanels.

    See other peoples having the same problem here http://www.sencha.com/forum/showthread.php?136806
    And here: http://www.sencha.com/forum/showthread.php?131162

    If anybody has a nice solution to have 2 treepanels sharing the same underlying data, please share

    It may be fixed in 4.1: http://www.sencha.com/forum/showthread.php?141390

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar