PDA

View Full Version : TreePanel - TreeSorter - afterrender/afterlayout



Zdeno
8 Mar 2010, 9:12 AM
When i can call constructor new Ext.tree.TreeSorter for treesort?

I tried put it in afterlayout function, afterrender function but nothing work for me.



...
Ext.ux.mailman.sourcePanel = new Ext.Panel({
layout: 'accordion'
,width: 250
,items:[{
title: 'project os'
,id: 'panel1'
,autoHeight: true
,items: [ Ext.ux.mailman.ostreeSearchBox, Ext.ux.mailman.ostree ]
},{
...




Ext.ux.mailman.ostree = {
xtype: 'treepanel'
,autoScroll:true
,width: 247
,height: 165
,animate:true
,rootVisible:false
,enableDrop: false
,enableDrag: true
,containerScroll: true
,root: new Ext.tree.AsyncTreeNode({
text: '<?= $AppUI->_("Organisation structure"); ?>'
,draggable:false
,id:'node0'
,expanded:true
})
,loader: new Ext.tree.TreeLoader({
dataUrl:'?m=projects&a=ajax',
baseParams: { 'action': 'loaddotprojectos', 'view': 0 },
preloadChildren:true
})
,listerners: {
afterlayout: function( container, layout ) {
console.log('afterlayout');
new Ext.tree.TreeSorter( Ext.ux.mailman.ostree, {folderSort:false} );
},
afterrender: function( component ) {
console.log('afterrender');
new Ext.tree.TreeSorter( Ext.ux.mailman.ostree, {folderSort:false} );
}
}
};

Zdeno
8 Mar 2010, 2:01 PM
Anyone? Or nobody is using treepanels coz any of my post with tree dont have reply :(