View Full Version : Get a view without using ref when the view is in a subfolder

28 May 2014, 1:58 AM
Given this controller snippet:


Ext.define( 'MyApp.controller.MyController', {
extend: 'Ext.app.Controller',
views : ['user.UserWindow'],

someFunction : function() {
// reference view here

This describes a set up where the UserWindow.js file is in a subfolder of "view" in the standard ExtJS MVC setup. But how, without resorting to using a ref definition in the controller config, can I use an auto-generated getter to get that view?

If it wasn't in a sub folder, I would use getUserWindowView() but this doesn't work when subfolders are being used.

Is there a way?

28 May 2014, 4:36 AM
You can use Ext.ComponentQuery.query() to gain access to your view.