SimonCVT
19 Jan 2012, 3:07 AM
Bit of a Noob question I think,
I have a view defined as follows :
Ext.define('Views.dialogs.ItemEditor',{
extend : 'Ext.window.Window',
alias:'widget.defaultitemeditor',
height:400,
width:600,
modal: true,
border:false,
bodyBorder:false,
layout: 'border',
loadRecord: function(record,editor){console.log("called within view");}
})
I then want to override my loadRecord entry using the control function of my controller ;
this.control({
'defaultitemeditor':
{
loadRecord : function(e,f) {console.log('Fired the controller code');}
}
})
However this doesn't appear to work, I'm assuming this is because loadRecord is not actually an event and possibly can't be handled via the control method. Does anyone know how i might go about doing this?
I have a view defined as follows :
Ext.define('Views.dialogs.ItemEditor',{
extend : 'Ext.window.Window',
alias:'widget.defaultitemeditor',
height:400,
width:600,
modal: true,
border:false,
bodyBorder:false,
layout: 'border',
loadRecord: function(record,editor){console.log("called within view");}
})
I then want to override my loadRecord entry using the control function of my controller ;
this.control({
'defaultitemeditor':
{
loadRecord : function(e,f) {console.log('Fired the controller code');}
}
})
However this doesn't appear to work, I'm assuming this is because loadRecord is not actually an event and possibly can't be handled via the control method. Does anyone know how i might go about doing this?