PDA

View Full Version : TreeView Example Not Working



ericinseattle
3 Mar 2012, 6:14 PM
Hello. I am new to Sencha so I maybe doing something obvious.I am trying to get the Treeview sample in the SDK to work; however when the page loads none of them render nodes: http://localhost/extjs/docs/index.html#!/example/tree/treegrid.html

I (http://localhost/extjs/docs/index.html#!/example/tree/treegrid.html) also tried creating a new simple sample using code below but it also not work. The other samples work, just not treeviews. I downloaded ext.4.0.7 and i am binding to:
<script type="text/javascript" src="extjs/ext-all.js"></script>

Thanks for the help, I want to get rocking!

<script language='JavaScript' type='text/JavaScript'>
Ext.require([
'Ext.tree.*',
'Ext.data.*',
'Ext.tip.*'
]);


Ext.create('Ext.tree.Panel', {
renderTo: Ext.getBody(),
title: 'Simple Tree',
width: 150,
height: 150,
root: {
text: 'Root',
expanded: true,
children: [
{
text: 'Child 1',
leaf: true
},
{
text: 'Child 2',
leaf: true
},
{
text: 'Child 3',
expanded: true,
children: [
{
text: 'Grandchild',
leaf: true
}
]
}
]
}
});

mitchellsimoens
4 Mar 2012, 7:16 AM
It's working fine for me. Run it with Firefox or Chrome and check out the request in the network tab of the developer tools or firebug and see what the response is. Is it returning an error?