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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:51:07+00:00 2026-06-18T03:51:07+00:00

I use the lastest emberjs 1.0 pre4. In App.FormController, I insert a childView to

  • 0

I use the lastest emberjs 1.0 pre4.

In App.FormController, I insert a childView to a containerView:

containerView.get('childViews').pushObject(
    App.FieldData4MultipleChoiceView.create()
);

In this childView, I try to print “me.get(‘controller’)”:

didInsertElement: function() {
    var me = this;
    $(".fieldset.group").on("click", ".fieldChoice img", function(e){
        var controller = me.get('controller');
        console.log(controller); // line A
    });
}

Question 1:
Why “line A” return an instance of App.ApplicationController class but not App.FormController?

Question 2:
How can I get single instance of App.FormController in any other view (not just the view under App.FormController)?

Thanks a lot!

  • 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-18T03:51:08+00:00Added an answer on June 18, 2026 at 3:51 am

    Question 1: Why “line A” return an instance of App.ApplicationController class but not App.FormController?

    Your example says “In App.FormController, I insert a childView to a containerView” but it’s not clear how that containerView came to exist or what it’s context is. That childView will inherit the context of it’s parent, so my guess is that containerView itself does not have App.FormController as it’s controller.

    Question 2: How can I get single instance of App.FormController in any other view (not just the view under App.FormController)?

    You can’t, at least not without really hacking ember’s internal APIs. This is by design. Each view should be really lightweight and depend only on it’s corresponding controller. That controller can bind to App.FormController or one of it’s properties, but the view does not need to be aware.

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

Sidebar

Related Questions

I have to maintain an app that create often resources and use them a
This is a question about the use of type classes in Haskell. I get
I use MinGW latest version to compile the following code. I get the folowing
I'm trying to use the Metakit library latest update, but I always get an
During development, I use this to load the latest jQuery: <script src=http://www.google.com/jsapi></script> <script type=text/javascript>
Using latest ember.js build, I'm trying to use a controller action to create a
I have tried to use the lastest version of magento connector on mule 3.2.
I work with Oracle Database and lastest Django but when i use the default
So while writing an Ember.js app, I couldn't get the most basic ember-data records
I use mysql 5.1. This is my DB schema : id user_id type created_at

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.