I have been loading TreeStore from a REST server, all works great if I construct the classes in the format the Tree requires on the Server.
However I want the client to identify which nodes are leaf nodes by inspecting the JSON for children and setting the leaf property accordingly.
I tried in onAppend listener but I think this is too late as the original JSON has already been bound to the model.

I have a model as below...
and load the Ext.data.TreeStore with this model assigned then apply this as a property in Ext.Tree.Panel.

Where could I place a listener to intercept the loading of the model in the store from the JSON in the response? I have been looking for this but could not find it...Maybe I am looking in the wrong place or taking the wrong approach

var e1tree = Ext.create('Ext.tree.Panel', {
title: 'Namespace',
width: 500,
height: 300,
collapsible: true,
rootVisible: false,
store: treeStore,
multiSelect: true,
columns: [{ var treeStore = Ext.create('Ext.data.TreeStore', {
model: 'NamespaceModel',
proxy: {
type: 'ajax',
url: Ei.sys.Appdata.eiHost + 'mysite/test', //elements',
listeners: {
append: function( thisNode, newChildNode, index, eOpts ) {

Ext.define('NamespaceModel', {
extend: 'Ext.data.Model',
fields: [
{name: 'uid', type: 'string'},
{name: 'name', type: 'string'},
{name:'uicls', type:'string'},
{name:'leaf', type:'boolean'}