PDA

View Full Version : Problem for get No selected from Tree



chuvinha
29 Sep 2010, 9:36 AM
I am with problema to get the selected No from Tree.
My code ia as follows:



function crudMenuClick(e){
var contextMenu = new Ext.menu.Menu({
items:[
{
icon:'imagens/adminreports.png',
text:'Renomear este nÝvel',
cls:'x-btn-text-icon',
handler:function(){crudAtributo(2);}
}
]
});

contextMenu.show(e.ui.getEl());
}


After I try to get the No selected from tree in my popup:




var panel = Ext.getCmp('panelAtributo');
var sm = panel.getSelectionModel();
var sel = sm.getSelected();

It is giving error in the 3║ line (sm.getSelected();).
Could someone help me?