PDA

View Full Version : store internalId error



kjcr
6 Mar 2013, 11:28 PM
hello^^

I face serious problem.:(

I set the store



var validationDetail = Ext.create('Ext.data.Store',{
model:'validationDetail11',
storeId:'validationDetail12',
proxy:{
type:'memory'
},
autoLoad:false
});


i insert data to store
at first, i works good.



var detail_store = Ext.data.StoreManager.get('validationDetail12');



for (var i = 0 ; i < ll ; i ++){
console.log(data[i]);
d={
taskId:data[i].taskId,
message:data[i].message,
state:data[i].state,
refIdx:data[i].refIdx
}
detail_store.add(Ext.data.Record(d));
}


But when i set store.removeAll() and then insert another records.
i show error below.



if(len >0)
detail_store.removeAll();



Uncaught TypeError: Cannot read property 'internalId' of undefined

ext-all-debug-w-comments.js:88860


I can't found solutions anywhere.
please help me.

mitchellsimoens
8 Mar 2013, 11:11 AM
Have you checked what this line returns:


Ext.data.Record(d)