Hi all,
I have a 3 PC with some panels and grids which works fine. Now I need to update records from a grid, but I need to do that with a formPanel instead of the usual updateWindow....
How can I do ?
I tried to redirect on the formPanel fro my context menu with
edition: function(btn,e){
location.href = '?a=edition&item='+this.menu.record.id+'&namespace=myns';
},
and to set a listener on my formPanel like this :
listeners: {
'setup': {fn:this.setup,scope:this},
'beforeSubmit': {fn:this.beforeSubmit,scope:this},
'success': {fn:this.success,scope:this}
}
But the setup is not fired, and I cannot access the object to update
the setup function is
setup: function(){
console.log('in setup : '+MODx.request.item); // nothing in the console setup not initialized !
if(!MODx.request.item) return '';
MODx.Ajax.request({
url: Mediaman.config.connectorUrl,
params: {
action: 'mgr/edition',
id: MODx.request.item
},
listeners: {
'success': {fn:function(r) {
console.log('succes this');
console.log(this);
this.getForm().setValues(r.object);
},scope: this}
}
});
}
I did it this way with older versions of Revo (beta versions) and it worked but with the class based processors I probably miss something elementary... Any help would be appreciated
Cheers
[ed. note: anso last edited this post 14 years, 3 months ago.]