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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:50:41+00:00 2026-06-08T11:50:41+00:00

I’m new to Ember and Handlebars. I am trying to create a table with

  • 0

I’m new to Ember and Handlebars.
I am trying to create a table with a dynamic content.
I add the code into jsfiddle

I have the following code:

<script type="text/x-handlebars">
<table border="1" bordercolor="FFCC00" style="background-color:FFFFCC" width="400" cellpadding="3" cellspacing="3">
  {{#each Table.tableController}}
  <tbody>
<tr>
    <td width ="30%">{{title}}</td>
    <td width ="30%">{{artist}}</td>
            <td width ="40%">{{genre}}</td>
</tr>
   </tbody>
  {{/each}}
</table>

A simple table binding a content from my controller.

And here is my controller and application:

Table = Ember.Application.create({});

Table.Cell = Ember.Object.extend({
title: null,
artist: null,
genre: null,
listens: 0
});

Table.tableController = Ember.ArrayProxy.create({
content: [],
init: function() {
    var data = Table.Cell.create({
    title: 'Ruby',
    artist: 'Kaiser Chiefs',
    genre: 'Indie Rock',
        });
    this.pushObject(data);
    data = Table.Cell.create({
    title: 'Somebody Told Me',
    artist: 'Killers',
    genre: 'Indie Rock',
        });
        this.pushObject(data);
    },
    createSong: function(title, artist, genre) {
    var cell = Table.Cell.create({
    title: title,
    artist: artist,
    genre: genre,
        });
    this.pushObject(cell);
    },
});

That’s working just fine.

Now I want to add a new song, and I am doing this via Chrome console with the following line:

 Table.tableController.createSong('Feiticeira', 'Deftones', 'Alternative');

I can verify that a new Object is created and inserted into my content array.
But there is no changes into my table.

What am I doing wrong?
Why my table is not creating a new content?

I pushed this code into jsfiddle to get help you help me.
Here’s the link to the code again.

  • 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-08T11:50:43+00:00Added an answer on June 8, 2026 at 11:50 am

    UPDATED ANALYSIS

    You forgot calling this._super(); in the init, which prevented your instance to have its binding management setup. (Fixed revision)

    You felt in a typical Ember gotcha: initial values should never be objects, as they would be shared by all class instances… See this article for more informations.

    FIX SAMPLE – Still recommended implementation

    Updated your JSFiddle @ http://jsfiddle.net/MikeAski/AgyAk/12/ with a few improvements (The most notable: make use of a controller rather than directly ArrayProxy. It is more idiomatic and ready to switch to Router infrastructure).

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

Sidebar

Related Questions

I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

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.