The view controller will be active, but it will be controlling one sub-view of many other views, so I think there will be other active view controllers.
By on-the-fly basically the form is created by a completely different dispatcher, with components and handlers, etc. with no direct connection between the view controller and the form.
The view controller has several functions I need to get results from:
canContinue: function (arg1) {var result = true; /*...*/ return result;}
getStatus: function (arg1, arg2) {var result = 0; /* ... */ return result;}
/*...*/
means code omitted. So I want access to the view controller and these functions. Something along these lines:
var controller = /* how to get it? */;
if (!controller.canContinue(p))
alert(controller.status(q, r));
I read it is not recommended to access functions directly in this manner, so tried firing events, but I can't seem to get results back, which I need.
I thought I could give the view controller an itemId
, and do Ext.ComponentQuery.query('#itemId')
, but it doesn't seem to work. I guess a view controller isn't a component, makes sense.
The view controller has a unique class and alias, and there will be only one of these view controllers active at a time, if that helps.
I'm probably missing something really easy. Any assistance would be welcome.
I am not quite sure about your question. Here is what I understand: You have different views and there is no direct relation between them. But you want to reach each other view's controller. If so, please check this fiddle: https://fiddle.sencha.com/#fiddle/urg
Otherwise, I'd prefer you prepare a fiddle, which show your problem.