Code that's causing me trouble
PHP Code:
Ext.define('IDB.selectbox.SelectBox', {
extend : 'Ext.form.ComboBox',
alias : 'widget.IDB.selectbox.SelectBox',
//clearFilterOnReset:false,
triggerAction: 'all',
lastQuery: '',
linkToCombo : undefined,
linkFilter : function() {
if(this.linkToCombo) {
var linkedCombo = this.ownerCt.getComponent(this.linkToCombo.comboID);
console.log(this.linkToCombo);
console.log(this.linkToCombo.filterField+linkedCombo.getValue());
this.getStore().filter([{
property : this.linkToCombo.filterField,
value : linkedCombo.getValue(),
exactMatch : true
}]);
}
},
initComponent : function() {
this.callParent(arguments);
if(this.linkToCombo) {
var linkedCombo = Ext.ComponentQuery.query('#'+this.linkToCombo.comboID);
this.addManagedListener(linkedCombo, 'select', function() { //This is the problem line
this.clearValue();
this.fireEvent('select');
}, this);
this.on('expand', this.linkFilter, this);
}
}
});
Error:
item.on is not a function, ext-debug-all.js (line 5613):
PHP Code:
// Within the Ext.util.Observable section:
5604 else {
5605 managedListeners.push({
5606 item: item,
5607 ename: ename,
5608 fn: fn,
5609 scope: scope,
5610 options: options
5611 });
5612
5613 item.on(ename, fn, scope, options);// Here's where the app breaks.
5614 }