First Q: is
controller.init function () {
this.control(
{
“live”? so that any further components added later on via UI events are also under the controllers watchful eye?
I am struggling to catch dynamically added link clicks by the controller:
controller
init: function () {
this.control(
{
'component[cls=pfLink]': {
click: this.onPfLinkClicked // NEVER GETS HERE
},
'component': {
click: this.onPfLinkClicked // DOESNT EVEN GET HERE
}
view
after store load:
var cmp = Ext.create('Ext.Component', {
autoEl: {
tag: 'a',
href: '#',
cls: 'pfLink',
html: ref
}
});
this.add( {
cellCls: 'question',
xtype: 'container',
items: cmp
});
…
By default they are dynamic, you can verify this:
Your problem is that component doesn’t fire a click event. Instead, create a custom component: