Skip to content

Instantly share code, notes, and snippets.

@codekoala
Created February 8, 2014 18:58
Show Gist options
  • Save codekoala/8888379 to your computer and use it in GitHub Desktop.
Save codekoala/8888379 to your computer and use it in GitHub Desktop.
glu.defModel('helloworld.nav', {
treestore: {
mtype: 'treestore',
proxy: {
type: 'ajax',
url: 'nav.json',
reader: {
type: 'json'
}
}
},
init: function() {
this.treestore.load();
}
});
glu.defView('helloworld.nav', {
xtype: 'treepanel',
region: 'west',
store: '@{treestore}',
rootVisible: false,
title: 'My Navigation'
});
glu.defModel('helloworld.main', {
navModel: {
mtype: 'helloworld.nav'
}
});
glu.defView('helloworld.main', {
title:'TreeNav',
items: [{
xtype: '@{navModel}'
}, {
region: 'center',
html: 'main content'
}]
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment