i'm learning ExtJs.
I'm trying to accomplish a very easy task: find a record, edit data and post changes back.
I have defined the model class with the correct proxy.
Now my code is like this:
const amodel=Ext.create('TestApp.model.theModel');
amodel.set('id','001');
amodel.load({
success(rec) {
// Ok, i have found the data
rec.set('aField',rec.data.entity.aField+' MODIFIED'); // Update the field
rec.save({ // Exception returned by the server cause data sent is not correct
success(rec) {
// The record has been updated
}
});
}
});
What's my mistake ?
thanks
Roberto
I have found the problem. Changed my code as follow: