Hello everyone,
I'm struggling with event propagation issue and I'm asking you guide...
I'm handling with: Ext.ux.form.MultiSelect and Ext.ux.form.ItemSelector,
the last drive from first, here:
Code:
Ext.define("Ext.ux.form.ItemSelector", {
extend: "Ext.ux.form.MultiSelect",
The super class handling already with selectChange event and I don't want to touch the existing behavior in the super class, I just want to add functionality or attaching that event from the sub class,
Here:
MultiSelect.js
Code:
Ext.define("Ext.ux.form.MultiSelect", {
extend: "Ext.form.FieldContainer",
.
.
.
onSelectChange: function(a, b) {
if (!this.ignoreSelectChange) {
this.setValue(b)
}
},
.
. .
});
ItemSelector.js
Code:
Ext.define("Ext.ux.form.ItemSelector", {
extend: "Ext.ux.form.MultiSelect",
.
.
. viewModel: {
data: {
_addAll: true,
_add: true,
_remove: true,
_removeAll: true
}
},
.
.
.
initComponent: function() {
// CATCH THE onSelectChange EVENT IN THE SUPER CLASS TO FIRE setButtonsState
},
.
. setButtonsState: function() {
var b = this,
vm = b.getViewModel();
vm.set('_addAll', ...);
vm.set('_removeAll', ...);
vm.set('_add', ...);
vm.set('_remove', ...);
},