1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    43
    Vote Rating
    0
    pk.hafeez is on a distinguished road

      0  

    Default Unanswered: How to load data in to one tree store(Memory proxy) from another tree store reader

    Unanswered: How to load data in to one tree store(Memory proxy) from another tree store reader


    Hi,

    I have couple of tree panels, each configured with individual tree stores. I have configured a proxy for one store. on load event of this, i am trying to load the second store(proxy memory) like below. But doesn't work.

    _treeStore2 = Ext.create('Ext.data.TreeStore', {
    model: 'Scenario',
    proxy : {
    type : 'memory'
    }

    });

    _treeStore1 = Ext.create('Ext.data.TreeStore', {
    model: 'Scenario',
    root:'data1',
    proxy : {
    type : 'ajax',
    url: '/proj/examples?id='+_Id,
    reader : {
    type : 'json',
    root:'data1'
    }
    },
    listeners: {
    'load': {
    fn: function(store, records, success, operations) {
    _treeStore2.setRootNode(_treeStore1.getProxy().getReader().jsonData.data2);
    }
    }
    });

    Sample JSON data: {"data1":[{"name":"value","children":[]}],"data2":[{"name":"value","children":[]}]}

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,704
    Answers
    3356
    Vote Rating
    751
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    You would have to use the appendChild method on a node in the first store.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1

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