Ext.create('Ext.tree.Panel',{
autoScroll:true,
border: false,
id:"tree",
rootVisible: false,
store : Ext.create('Ext.data.TreeStore', {
model: 'ctreemodel',
root : {
text: 'Tree Node',
expanded : true,
children : [ {
text : "detention",
aa:'bb',
leaf : true ,
hrefTarget: "ui/SysMonitor/1.html"
}, {
text : "homework",
expanded : true,
children : [ {
text : "book report",
leaf : true,
hrefTarget: "ui/SysMonitor/2.html"
}, {
text : "alegrbra",
leaf : true ,
hrefTarget: "ui/SysMonitor/3.html"
} ]
}, {
text : "buy lottery tickets",
leaf : true
} ]
}
}),
listeners : {
'itemclick' : function(view,re){
var leaf = re.get('leaf');
if (leaf) {
var text = re.get('text');
var hrefTarget = re.get('hrefTarget');
newTab(mainPanel, re.get('id'), hrefTarget, false, null, text);
}
}
}
})