A saga do Extjs continua

0 respostas
P

Pessoal alguem por obsequio consegue ver algum erro aqui:

Ext.namespace('Sponsorship');

Sponsorship.createPanelForWest = function(){

		myTreeLoader =
		[
			{"text" : "Audi", "id" : 100, "leaf" : false, "cls" : "folder", "children" : [
			{"text" : "A3", "id" : 1000, "leaf" : false, "cls" : "folder", "children" :
			[ {"text" : "Fuel Economy", "id" : "100000", "leaf" : true, "cls" : "file"},
			{"text" : "Invoice", "id" : "100001", "leaf" : true, "cls" : "file"},
			{"text" : "MSRP", "id" : "100002", "leaf" : true, "cls" : "file"},
			{"text" : "Options", "id" : "100003", "leaf" : true, "cls" : "file"},
			{"text" : "Specifications", "id" : "100004", "leaf" : true, "cls" : "file"}
			]
			},
			{"text" : "TT", "id" : 1000, "leaf" : false, "cls" : "folder", "children" :
			[ {"text" : "Fuel Economy", "id" : "100000", "leaf" : true, "cls" : "file"},
			{"text" : "Invoice", "id" : "100001", "leaf" : true, "cls" : "file"},
			{"text" : "MSRP", "id" : "100002", "leaf" : true, "cls" : "file"},
			{"text" : "Options", "id" : "100003", "leaf" : true, "cls" : "file"},
			{"text" : "Specifications", "id" : "100004", "leaf" : true, "cls" : "file"}
			]
			}]
			}];

		 // Panel for the west
        var panelForTree = new Ext.tree.TreePanel('mainContent',
			{

        	        animate:true,
			enableDD:false,
			lines: true,
			selModel: new Ext.tree.MultiSelectionModel(),
			loader: new Ext.tree.TreeLoader()

        });

	   	var root = new Ext.tree.AsyncTreeNode({
			text: 'Autos',
			draggable:false,
			id:'source',
			children: myTreeLoader
		});
		
		panelForTree.setRootNode(root);
		
		panelForTree.render(true);
		root.expand(true);
		root.collapse(true);
		
        
        return panelForTree;
}

erro via firebug:

this.root has no properties
[Break on this error] Ext.tree.TreePanel=Ext.extend(Ext.Panel,{rootVisible:true,animate:Ext.enableFx,l...

Vlu galera.........

Criado 16 de maio de 2008
Respostas 0
Participantes 1