This doesn’t seem to work
http://jsfiddle.net/8haXN/7/
App.president = Ember.Object.create({
name: "Barack Obama",
name2: "George Bush"
});
App.country = Ember.Object.create({
presidentNameBinding: 'App.president.name'
});
App.country.set('presidentNameBinding', 'App.president.name2');
App.country.presidentName //stil returns 'Barack Obama'
What I’m really trying to do is to change the contentBinding of a CollectionView from one ArrayController to another. Is that possible or is it a bad idea?
You will have to manually bind this way:
Here’s the jsfiddle: http://jsfiddle.net/efPGF/
To read more about bindings, I recommend looking at the old Sproutcore wiki: http://wiki.sproutcore.com/w/page/12412963/Runtime-Bindings. Just remember to change SC prefix to Ember.