I have one function in controller. It will return a value. I have called that function in view using renderer:this.getController('test.controller.Barchart').change();
but it is not working. I am getting an error wind has no method getController()
. Can anybody tell me how to call it correctly?
Having a view call a controller is considered the essence of evil. The view should never be aware of the controller. I'm a lead on a large project that uses ExtJS and we don't allow anything in our views other than the JSON description of the view. The logic that is looking for a controller should likely be in the controller itself.