Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8979089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:46:00+00:00 2026-06-15T19:46:00+00:00

I have defined a controller in Sencha, that includes a refs attribute referencing my

  • 0

I have defined a controller in Sencha, that includes a refs attribute referencing my view, yet whenever I call the automatically generated “get” function to get the view, based on the refs attribute, it returns undefined. Here is my example:

I have the following controller in app/controller/Locals.js:

Ext.define('MobileUnion.controller.Locals', {
    extend: 'Ext.app.Controller',

    // Base class methods.
    launch: function () {
        this.callParent(arguments);
    },
    init: function () {
        this.callParent(arguments);
    },

    config: {
        refs: {
        localsEditorView: 'localseditorview',
    },
    control: {
        localsEditorView: {}
    }
    },
    slideUpTransition: { type: 'cover', direction: 'up' },
    onEditLocalsCommand: function() {
        this.activateLocalsEditor();
    },
    activateLocalsEditor: function() {
        var localsEditorView = this.getLocalsEditorView();
        console.log(localsEditorView);  // Returns "undefined" to console.
        Ext.Viewport.animateActiveItem(localsEditorView, this.slideUpTransition);
    }
});

I have the following view in app/views/LocalsEditor.js:

Ext.define('MobileUnion.view.LocalsEditor', {
    extend: 'Ext.Panel',
    alias: 'widget.localseditorview',

    config: {
        html: 'This is the new view which should show up on top!'
    },
});

So, in the above example, if I call this.getLocalsEditorView() from within my controller, I get “undefined” even though I set a refs attribute as localsEditorView: 'localseditorview' and I defined MobileUnion.view.LocalsEditor to include an alias of widget.localseditorview. I feel like I should get the view when I do this.

By the way, I did define the view in the views attribute of my app.js, so that’s not it.

Further information: there’s no actual error being returned in my webkit console. Just the call to console.log() noted above in my controller returns undefined, rather than the view object.

Question: What do I have to do to make this function return the view, and not undefined? Any help would be appreciated. I’ve looked to make sure it’s not just a typo; it does not seem to be.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:46:02+00:00Added an answer on June 15, 2026 at 7:46 pm

    The “refs” is to create references to existing components. So far all you’ve done is declare a class, from what you’ve posted you’ve never instanced it anywhere.

    You might want to read the docs about autoCreate here:
    http://docs.sencha.com/touch/2-1/#!/api/Ext.app.Controller-cfg-refs

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an ASP.NET MVC 3 controller action. That action is defined as follows:
Suppose I have defined route like that, context.MapRoute( Preview, /preview/{id}/{type}, new { controller =
I'm trying to embed data I have defined in my controller in my view.
I have a controller defined as: [AcceptVerbs(HttpVerbs.Post)] public JsonResult PostMoreData(DataContracts.Address address, DataContracts.GeoLocation geoLocation) {
I have a Controller defined like this: package controllers import play.api._ import play.api.mvc._ import
I have a Controller named Author . Inside the controller, I have defined a
I have a variable @products = Product.all defined inside new method in a controller.
I have a very simple model that includes the auto-filled field much like 'created'.
I have a controller defined like this: Ext.define('MyApp.controller.TestController', { extend: 'Ext.app.Controller', config: { },
i have defined a route culture/Controller/action/id... my controller contains following action.. [OutputCache(Duration=60*10)] public ActionResult

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.