In the docs there is the following example which I modified a bit to check if data is loaded accordingly to model properties.

I used this code in the docs :http://ift.tt/1vCYp4J



Code:



Ext.define('myApp.Territory', {
extend: 'Ext.data.TreeModel',
fields: [{
name: 'text',
mapping: 'name'
}]
});
Ext.define('myApp.Country', {
extend: 'Ext.data.TreeModel',
fields: [{
name: 'text',
mapping: 'name'
}]
});
Ext.define('myApp.City', {
extend: 'Ext.data.TreeModel',
fields: [{
name: 'text',
mapping: 'name'
}]
});
Ext.create('Ext.tree.Panel', {
renderTo: document.body,
height: 200,
width: 400,
title: 'Sales Areas - using typeProperty',
rootVisible: false,
store: {
// Child types use namespace of store's model by default
model: 'myApp.Territory',
proxy: {
type: 'memory',
reader: {
typeProperty: 'mtype'
}
},
root: {
children: [{
name: 'Europe, ME, Africa',
mtype: 'Territory',
children: [{
name: 'UK of GB & NI',
mtype: 'Country',
children: [{
name: 'London',
mtype: 'City',
leaf: true
}]
}]
}, {
name: 'North America',
mtype: 'Territory',
children: [{
name: 'USA',
mtype: 'Country',
children: [{
name: 'Redwood City',
mtype: 'City',
leaf: true
}]
}]
}]
}
}
});

and I changed mapping of Territory from 'name' into 'countryName'. All lower models with other types then read countryName property. So I guess the corresponding types are not loaded, reader falls back on default type myApp.Territory.

You need to provide namespace here in the data. Maybe this is not correct documented.