Hi,
I have a varialble in Controller like,
Code:
Ext.define('MyApp.controller.MyController', {
extend: 'Ext.app.Controller',
onFieldButtonClick: function(button, e, options) {
var groupChecked = Ext.getCmp('groupgrid').getSelectionModel().getSelection();
var arrayValues = [];
Ext.each(groupChecked, function(rec, index) {
arrayValues.push(rec.get('colName'));
});
var MyGrid = Ext.ComponentQuery.query('MyGrid')[0];
MyGrid.getStore().reload({
params:{
singleton: true,
param1: [arrayValues]
}
});
...
I want to use this arrayValues in another js in another location, I am doing,
Code:
groupField: MyApp.controller.MyController.param1
But I am not getting the value there, how should I do to get the selected value?