Hi,

i have problems to load a TreeStore from another TreeStore with different Models... I have something like this:

https://fiddle.sencha.com/#view/editor&fiddle/2heo

PHP Code:
Ext.define('myApp.Treemodel_1', {
    
extend'Ext.data.TreeModel',
    
fields: [{
        
name'text',
        
mapping'name'
    
}],

    
proxy: {
        
type'memory',
        
reader: {
            
type'json',
            
rootProperty: function (data) {
                return 
data.data || data.children;
            },
            
totalProperty'total'
        
}
    }
});
Ext.define('myApp.TreeStore_1', {
    
extend'Ext.data.TreeStore',
    
model'myApp.Treemodel_1',
    
root: {
        
expandedtrue,
        
children: [{
            
text'detention',
            
leaftrue
        
}, {
            
text'homework',
            
expandedtrue,
            
children: [{
                
text'book report',
                
leaftrue
            
}, {
                
text'algebra',
                
leaftrue
            
}]
        }, {
            
text'buy lottery tickets',
            
leaftrue
        
}]
    }
});

// The same config except the model now has a checked property
Ext.define('myApp.Treemodel_2', {
    
extend'Ext.data.TreeModel',
    
fields: [{
        
name'checked',
        
defaultValuefalse
    
}, {
        
name'text',
        
mapping'name'
    
}],

    
proxy: {
        
type'memory',
        
reader: {
            
type'json',
            
rootProperty: function (data) {
                return 
data.data || data.children;
            },
            
totalProperty'total'
        
}
    }
});
Ext.define('myApp.TreeStore_2', {
    
extend'Ext.data.TreeStore',
    
model'myApp.Treemodel_2',
    
root: {
        
expandedtrue,
        
children: []
    }
});

Ext.application({
    
name'Fiddle',

    
launch: function () {
        var 
store1 Ext.create('myApp.TreeStore_1')
        var 
store2 Ext.create('myApp.TreeStore_2')

        
Ext.create('Ext.tree.Panel', {
            
title'Tree1',
            
width200,
            
height200,
            
storestore1,
            
rootVisiblefalse,
            
renderToExt.getBody()
        });

        
Ext.create('Ext.tree.Panel', {
            
title'Tree2',
            
width200,
            
height200,
            
storestore2,
            
rootVisiblefalse,
            
renderToExt.getBody()
        });

        
console.log(store1.getData())

        
store2.loadRawData(Ext.clone(store1.getData().items))

    }
});