View Full Version : Calling a method of Controller instances / Application instances

19 Apr 2012, 6:01 AM
Hi All,

I have application with controllers. I need to call a method of one of those controllers / application.

My application name is 'com.student.poc'. I have tried with 'com.student.poc.func();' and 'com.student.poc.getController("cont").func1();'

Please advice,

19 Apr 2012, 11:44 AM
Within any method of any Controller, you can get a reference to a different controller:

var someOtherController = this.getController("SomeControllerName");
var results = someOtherController.someFunctionCall(<optional parameters>);

14 May 2012, 9:21 AM
Have you looked at the docs for the controller (http://docs.sencha.com/ext-js/4-1/#%21/api/Ext.app.Controller)? Where are you wanting to call the function from?