PDA

View Full Version : [FIXED][3.x] Record auto id



mjlecomte
30 Mar 2009, 3:33 AM
Seems a static id is being assigned to records, overwriting all previous records, so only one record will show up in grids at the moment. Check any example, say array grid.



Ext.data.Record.id = function(rec) {
rec.phantom = true;
return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID].join('');
}

Condor
30 Mar 2009, 3:37 AM
OK, you've found it problem yourself.

IMHO this should have been:

Ext.data.Record.id = function(rec) {
rec.phantom = true;
return [Ext.data.Record.PREFIX, '-', Ext.data.Record.AUTO_ID++].join('');
}

evant
30 Mar 2009, 5:28 AM
Fixed.