To get a view link in the controller, simply use the getView () method from the Controller class. To create a connection between the view and the controller, make sure that you follow the principles of the MVC application architecture, here here
var view = this.getView('Contact');
if combobox is a view element in which your controller is disabled, then use the control method also from the Controller class.
Ext.define('My.controller.Contact', { extend: 'Ext.app.Controller', views: ['Contact'], init: function() { //reference the view var view = this.getView('Contact'); //reference the combobox change event this.control({ 'mywin combobox': { change: this.onChangeContinent } }); }, onChangeContinent:function (field, value, options) { //here you can get combobox component and its value Ext.Msg.alert('Continent', value); } });
Here is an example script
EDIT:
To reference one component from another, you can use the Controller ref method, for example:
refs: [{ ref: 'combo', selector: 'mywin combobox' }]
source share