git.ithinksw.org
/
extjs.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Upgrade to ExtJS 4.0.7 - Released 10/19/2011
[extjs.git]
/
docs
/
guides
/
tree
/
examples
/
simple_tree
/
app.js
1
/**
2
* @example Simple Tree
3
*
4
*/
5
Ext.require('Ext.tree.Panel');
6
Ext.require('Ext.data.TreeStore');
7
Ext.onReady(function() {
8
var store = Ext.create('Ext.data.TreeStore', {
9
root: {
10
text: 'Root',
11
expanded: true,
12
children: [
13
{
14
text: 'Child 1',
15
leaf: true
16
},
17
{
18
text: 'Child 2',
19
leaf: true
20
},
21
{
22
text: 'Child 3',
23
expanded: true,
24
children: [
25
{
26
text: 'Grandchild',
27
leaf: true
28
}
29
]
30
}
31
]
32
}
33
});
34
35
Ext.create('Ext.tree.Panel', {
36
renderTo: Ext.getBody(),
37
title: 'Simple Tree',
38
width: 150,
39
height: 150,
40
store: store
41
});
42
});