Results 1 to 2 of 2

Thread: Get a view without using ref when the view is in a subfolder

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Answers
    4

    Default Get a view without using ref when the view is in a subfolder

    Given this controller snippet:


    Code:
    ...
    
    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?

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    You can use Ext.ComponentQuery.query() to gain access to your view.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •