PDA

View Full Version : Passing data into menu handler



savsw
13 Sep 2010, 3:39 AM
Hello,


contextmenu:{
fn: function(list,ind,node,e){
if(this.contextMenu){
this.contextMenu.destroy();
}
var contactData = list.store.getAt(ind).data;
this.contextMenu = new context.ContactsContextMenu(
this, /* app */
contactData,
node.id,
{
lazyload: true
});
this.contextMenu.show(node);

},
scope: this.app
}
...
context.ContactsContextMenu = function (appl, contactData, idt, conf){
var config = Ext.applyIf(conf||{},{
items:[
{ text: 'Call extension',
handler: FDPApp.contactCallExtension,
disabled: ( contactData.primaryExtension == "" ? true : false ) },
...
Ext.app.App = Ext.extend (Ext.app.App,{
...
contactCallExtension: function(/*How to pass data here?*/id){
alert('Call primary ext '+id); // here id - undefined
},

Animal
13 Sep 2010, 3:40 AM
What's the question?

13 Sep 2010, 4:53 AM
Approved thread.

Exactly what Nige said --- what exactly are you asking?!?!