PDA

View Full Version : Uncaught exception



arcticweb
6 Oct 2010, 9:09 AM
I am getting the following error in Firebug:

uncaught exception: Ext.data.Store: Attempted to execute a write-action without a DataWriter installed.

I have created a working Editable Grid, pulling info from the database, but am having trouble when I try to save it. I don't see anything that mentions I need to "install" the DataWriter.

My store is setup as follows:


var myContactsStore = new Ext.data.Store({
proxy : crudProxy,
storeId: 'myContactStore1',
reader : readerJsonMyContacts,
// writer: minContactsWriter,
writer: Ext.data.JsonWriter({
returnJson: true,
writeAllFields: false,
encode: true,
listful: true
}),
remoteSort : false,
nocache : true,
autoLoad : true,
autoSave: false,
autoCommit: false,
baseParams: {
method: 'post',
min_contacts: 'load',
format: 'json'
},
listeners: {
load: function() {
// Loaded
}
},
fields: ['bus_unit','dept_id','ee_id','name','email']
});

Any help would be appreciated. Thanks!

plalx
6 Oct 2010, 9:25 AM
I think you just forgot the new keyword to create an instance of a Ext.data.JsonWriter.



writer: new Ext.data.JsonWriter({
returnJson: true,
writeAllFields: false,
encode: true,
listful: true
}),

arcticweb
6 Oct 2010, 9:45 AM
Yes, I did miss that in my example. However, I had originally created the writer as a separate object. I think the problem there was an ordering issue, as I was attempting to create the store before the writer. Same uncaught exception either way. Fixed now though. Thanks!