PDA

View Full Version : upgrade ext2 to ext3 (TreePanel, TreeLoader)



seb081977
11 Dec 2009, 5:16 AM
I try to upgrade my application from ext2 to ext3, but I have some problem with TreePanel.
My TreePanel don't appear and I have an error like this in firebug :

ext-all.js (line 7) :
d is null

Ext.DomHelper=function(){var s=null,j=/^...b.stopEvent();this.completeEdit()}}}});\n

Here is my complete source of my class DsitAnnuaireArborescence :

var DsitAnnuaireArborescence = Ext.extend(Ext.tree.TreePanel,{
id : 'tree-panel'
,title : ''
,split : true
,height : "100%"
,minSize : 150
,autoScroll : false
,rootVisible : false
,lines : false
,singleExpand : true
,border : false
,bodyStyle : 'background-color:transparent;'
,useArrows : true
,hlColor : '#FFFFFF'
,loader : new Ext.tree.TreeLoader({
dataUrl:'./php/recupDsitArborescence.php'
})
,root: new Ext.tree.AsyncTreeNode()
,onRender: function(){
DsitAnnuaireArborescence.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('dsit-annuaire-arborescence-xtype', DsitAnnuaireArborescence);

I need help ...
Thanks

seb081977
11 Dec 2009, 6:13 AM
I find a solution. I replace the precedent class by this :


var DsitAnnuaireArborescence = Ext.extend(Ext.tree.TreePanel,{
id : 'tree-panel'
,title : ''
,split : true
,height : "100%"
,minSize : 150
,autoScroll : false
,rootVisible : false
,lines : false
,singleExpand : true
,border : false
,bodyStyle : 'background-color:transparent;'
,useArrows : true
,hlColor : '#FFFFFF'
,dataUrl:'./php/recupDsitArborescence.php'
,root: {
nodeType: 'async',
text: 'Ext JS',
draggable: false,
id: 'src'
}
,onRender: function(){
DsitAnnuaireArborescence.superclass.onRender.apply(this, arguments);
}
});
Ext.reg('dsit-annuaire-arborescence-xtype', DsitAnnuaireArborescence);