PDA

View Full Version : Button Menu Issue (ExtJs 4.1.1)



rsyhanes86
17 Sep 2012, 8:18 AM
Hi, I got some trouble when rendering a button menu using 4.1.1 version, This is the code of button:{ text:'Mis Aplicaciones', menu:{ loader:{ autoLoad:true, url: '../ac/execute', renderer: 'component', params:{ route:'ac_getuserapps' } } }}As you can see I load items of menu from serverside wich is perfectly done. I even have inspected the menu object and menu items are inside. But, when I try to dropdown the menu clicking the button I get this error:"Uncaught TypeError: Cannot read property 'dom' of null ext-all-debug.js:26402"And menu never shows up.Hoping for some help!!! http://www.sencha.com/forum/images/smilies/17.gif

scottmartin
18 Sep 2012, 3:06 PM
This seems to work:

text.txt

Menu Item



Ext.onReady(function(){

Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
loader: {
url: 'text.txt',
autoLoad: true
},
handler: function() {
alert('You clicked the button!');
}
});

});


Scott