I've tried this with 2.0.1.1 and get the same results. Are you asking if I reference each record by id? If so, no I do not, I just load it via Direct.
Since it is happening on all stores, I'll include one example with model.
Code:
Ext.define('BBAdmin.model.glossaryModel', {
extend: 'Ext.data.Model',
config: {
fields: [
{
name: 'glossary_id',
type: 'int'
},
{
name: 'gtitle',
type: 'string'
},
{
name: 'gbody',
type: 'string'
},
{
name: 'gkey',
type: 'string'
}
]
}
});
Code:
Ext.define('BBAdmin.store.glossaryDirect', {
extend: 'Ext.data.Store',
requires: [
'BBAdmin.model.glossaryModel'
],
config: {
autoLoad: true,
model: 'BBAdmin.model.glossaryModel',
storeId: 'glossaryDirect',
proxy: {
type: 'direct',
directFn: glossaryDirect.getAllGrid,
reader: {
type: 'json',
rootProperty: 'data'
}
},
sorters: {
property: 'gtitle'
}
}
});
Code:
Ext.Viewport.setMasked({
xtype:'loadmask',
indicator: true,
message:'Submitting...'
});
form = button.up().up();
record = form.getRecord();
values = form.getValues();
//todo validation
var store = Ext.getStore('glossaryCRUD');
var newRecord = Ext.create('BBAdmin.model.glossaryModel');
newRecord.setConvertedData(form.getValues());
var errors = newRecord.validate();
if (!errors.isValid()) {
Ext.Msg.alert('Wait!', errors.getByField("gtitle")[0].getMessage(), Ext.emptyFn);
newRecord.reject();
newRecord.destroy();
Ext.Viewport.setMasked(false);
return;
} else {
store.add(newRecord);
debugger;
store.sync();
Ext.Viewport.setMasked(false);
Ext.getStore('glossaryCRUD').removeAll();
Ext.getCmp('glossarylist').getStore().load();
Ext.getCmp('pnavtab').pop();
this.currentGlossary = '';
}
I've ended up creating a CRUDStore for the sole purpose of CUD. Obviously not the way I want to do this, but I needed to get this out the door. What is strange is from the first point I can get a handle on the store after the load, it references all the records as dirty. No action other than the load performed on the store. Thanks again for looking into this.