PDA

View Full Version : tree rendering problem



pailyanish
27 Jan 2010, 11:57 PM
var amra_tree = new Ext.tree.TreePanel({
id:'amra',
rootVisible: true,
trackMouseOver:true,
singleExpand: false,
renderTo:'tree',
title:'Layer Manager',
width:250,
height:400,
frame:true,
root: new Ext.tree.AsyncTreeNode({
id :'root',
text:'Themes',
expanded:true,
listeners:{
'render':function(){
this.hide();
}
},
children: [
{
text:'Theme-Lines',id:'amra_lines', leaf:false,checked:true,
expanded:true,
children :
[
{text:'Roads', id :'1',leaf:true,checked:false},
{text:'Lanes',id:'2',leaf:true,checked:false},
{text:'Drainages', id:'3',leaf:true,checked:false}

]

},
{
text:'Theme-Points',id:'amra_points', leaf:false,
expanded:true,
children :
[
{text:'Information Boards', id :'4',leaf:true,checked:false},
{text:'Street lights',id:'5',leaf:true,checked:false},
{text:'Telephone posts', id:'6',leaf:true,checked:false},
{text:'Electric posts', id:'7',leaf:true,checked:false},
{text:'Transformer', id:'8',leaf:true,checked:false}

]

},
{
text:'Theme-Polygons',id:'amra_poly', leaf:false,
expanded:true,
children :
[
{text:'Properties', id :'9',leaf:true,checked:false},
{text:'Shopes',id:'10',leaf:true,checked:false}
]

}
]
}),

});

daanlib
28 Jan 2010, 4:17 AM
This is the "Ext: Help" section of the forum. It's commonly used for asking questions. This is no question, tell us what's wrong and put your code in code tags please.

PS: I spotted a trailing comma at the third line from the end. IE doesn't like that. Try using jslint (http://www.jslint.com)