I have an Ember.TextField bound to the title field in my Document model. I'm using the RESTAdapter and Ember 1.0.0-pre4.
Model and controllers
App.Document = DS.Model.extend({
title: DS.attr('string')
});
App.DocumentController = Ember.ObjectController.extend({
});
App.ApplicationController = Ember.Controller.extend({
save: function() {
var doc = this.controllerFor('document'),
model = doc.get('model');
doc.store.commit();
}
]);
document.handlebars template
{{view Ember.TextField valueBinding="title"}}
After calling the save
method on my controller it will successfully save the title
to the backend and will no longer be considered isDirty
.
However if I input any data into the TextField after a save
Ember Data throws me this error:
Uncaught Error: Attempted to handle event `willSetProperty`
on <App.Document:ember262:1> while in state rootState.error.
Called with
{reference: [object Object], store: <App.Store:ember268>, name: title}
What am I doing wrong?