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 7613463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:09:40+00:00 2026-05-31T02:09:40+00:00

i am wondering about the ‘refs’ attribute of Sencha Touch class ‘Ext.app.Controller’. I saw

  • 0

i am wondering about the ‘refs’ attribute of Sencha Touch class ‘Ext.app.Controller’.
I saw a video tutorial where a simple contactForm was built. No i’ve tried to build a contact form for my app and i get an error: ‘Uncaught TypeError: Object [object Object] has no method ‘getContactForm”

Here’s my controller

Ext.define('MyFirstApp.controller.Main', {
extend: 'Ext.app.Controller', 
views: ['Viewport', 'Home'],

refs: [
     {
         ref: 'contactForm',
         selector: '#contactForm'
     }
],

init: function() {
    this.control({
        'button[action=submitContact]': {
            tap: 'submitContactForm'
        }
    });
},

submitContactForm: function() {
    var form = this.getContactForm();
    form.submit({
        url: 'contact.php'
    });
}

});

I guess it’s something wrong with the ‘refs’, in the video that guy said the “getContactForm” method will be created because of the “ref” attribute of “contactForm” but it doesn’t. What am i doing wrong here?..Thanks for help!

  • 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-05-31T02:09:41+00:00Added an answer on May 31, 2026 at 2:09 am

    It looks as though you may have the refs configured wrong. Here’s a simple controller:

    Ext.define('App.controller.Main', {
      extend: 'Ext.app.Controller',
      config: {
        refs: {
          main: 'mainpanel'
        }
      }
    });
    

    mainpanel is an xtype or could be a css selector and main will give you getMain() like what was talked about in the video.

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

Sidebar

Related Questions

I am wondering about the best hosting for Rails 3.1 app based on ruby
I wondering about sense of using XmlDocument class to processing a small XML files.
Wondering about using gzipped resources for my iOS app. The idea is to unzip
I'm currently wondering about composing an object/class/trait that conforms to one trait for multiple
Just wondering about the performance impact of copying very large php variables. For example
Just wondering about this code below... when I turn off my internet connection and
Just wondering about some practice about this; I have made a simple visual C#
I was wondering about caching dynamic PHP pages. Is it really about pre-compiling the
I was wondering about ?? signs in C# code. What is it for? And
I have been wondering about the reload() function in python, which seems like it

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.