mark.tvi
14 May 2012, 3:05 AM
Hi, I have a list component inside a navigation view and on the itemtap event it instantiates a new custom panel and adds it to the navigation view. I've created a controller action on the custom panel's painted event. This doesn't fire at all even though I know the component query is correct. If I add a listener to the painted event directly on the custom panel is fires correctly every time.
Am I doing something wrong?
Ext.define('My.controller.CustomController', {
extend: 'Ext.app.Controller',
config: {
control: {
"customList": {
itemtap: 'onCustomListItemTap'
},
"customPanel": {
painted: 'onCustomPanelPainted'
}
}
},
onCustomListItemTap: function(dataview, index, target, record, e, options) {
dataview.up('navigationview').push(Ext.create('My.view.CustomPanel', {
title: record.data.firstName + ' ' + record.data.lastName,
data: {
ID: record.data.ID
}
}));
},
onPanelPainted: function(component, options) {
console.log('painted event fired');
}
});
Am I doing something wrong?
Ext.define('My.controller.CustomController', {
extend: 'Ext.app.Controller',
config: {
control: {
"customList": {
itemtap: 'onCustomListItemTap'
},
"customPanel": {
painted: 'onCustomPanelPainted'
}
}
},
onCustomListItemTap: function(dataview, index, target, record, e, options) {
dataview.up('navigationview').push(Ext.create('My.view.CustomPanel', {
title: record.data.firstName + ' ' + record.data.lastName,
data: {
ID: record.data.ID
}
}));
},
onPanelPainted: function(component, options) {
console.log('painted event fired');
}
});