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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:35:20+00:00 2026-06-02T04:35:20+00:00

In SproutCore, it is a common way to bind the ListView.content to an ArrayController:

  • 0

In SproutCore, it is a common way to bind the ListView.content to an ArrayController:

Todos.todosController = SC.ArrayController.create({
});

SC.ListView.design({
    contentBinding: SC.Binding.oneWay('Todos.todosController'),
    exampleView: SC.CheckboxView.design({
      ..........
    })
})

But the “content” field of ListView which extends from SC.CollectionView is SC.Array, should’t it be:

contentBinding: SC.Binding.oneWay('Todos.todosController.content')

Any explanation will be appreciated. Sorry for the poor english.

@TopherFangio I looked at the implementation of SC.ArrayController and find out that .arrangedObjects is a very simple computed property that returns the object it belongs to:

arrangedObjects: function() {
    return this;
}.property().cacheable()

So binding to .arrangeObjects is actually the same as binding to: App.arrayController.arrangeObjects

I also find out SC.ArrayController extends SC.Array and implements the two required methods ‘replace()’ and ‘objectAt()’.

To support SC.Array in your own class, you must override two primitives to use it: replace() and objectAt().

The implementation of these two methods in SC.ArrayController will do some array controller specific check and forward the request to the .content property.

So just like @TopherFangio said, SC.ArrayController is a proxy for it’s underlying .content property. If i bind to App.arrayController.content directly rather than the controller itself, i think i will lose all the arrayController goodness.

Thanks again for your great help @TopherFangio.

  • 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-02T04:35:20+00:00Added an answer on June 2, 2026 at 4:35 am

    SC.ArrayController is actually a proxy object which does some nice things for you.

    You can certainly bind to the .content property, but you could also bind to the .arrangedObjects property and set the orderBy property. This would let you modify orderBy and have the bound list automatically update. In general, this is what you want to do.

    Additionally, I believe that Todos.todosController.length will always be a number, even if the content is null. In contrast, calling Todos.todosController.content.length would throw an error if content was null.

    Hope this helps 🙂

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

Sidebar

Related Questions

Going through the SproutCore Getting started tutorial and have a problem. Inside the Todos.todoListController
i'm trying to create the same thing as shown in the sproutcore doc http://docs.sproutcore.com/
Is there any way in which I can do XML Paring in SproutCore (or
I have a sproutcore 1.0 page with SC.ListView items and a SC.TextFieldView bound to
This working code is using Sproutcore: person = SC.Object.create({ firstName: 'Foo', lastName: 'Bar', fullName:
Hey... I started using Javascript MVC SproutCore Framework (sproutcore.com) and I found it impressive.
I am building a web-based application. The frontend has been designed in Sproutcore. For
As the title, I want to implement a dropdown list using Sproutcore 1.6. I
SproutCore is said to be a JavaScript framework, so how to use it entirely
I'm just learning about SproutCore now, seems great. But I can't find a good

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.