[Commits] r1312 - core/trunk/geoext/lib/GeoExt/data
commits at geoext.org
commits at geoext.org
Thu Aug 6 17:08:56 CEST 2009
Author: tschaub
Date: 2009-08-06 17:08:56 +0200 (Thu, 06 Aug 2009)
New Revision: 1312
Modified:
core/trunk/geoext/lib/GeoExt/data/FeatureReader.js
Log:
Newly created features do not get an id. In Ext 3.0, this makes them 'phantom' records. After a successful store.save, they will be first class records with an id based on the server response. r=ahocevar (closes #137)
Modified: core/trunk/geoext/lib/GeoExt/data/FeatureReader.js
===================================================================
--- core/trunk/geoext/lib/GeoExt/data/FeatureReader.js 2009-08-06 13:25:33 UTC (rev 1311)
+++ core/trunk/geoext/lib/GeoExt/data/FeatureReader.js 2009-08-06 15:08:56 UTC (rev 1312)
@@ -109,7 +109,9 @@
values.state = feature.state;
values.fid = feature.fid;
- records[records.length] = new recordType(values, feature.id);
+ // newly inserted features need to be made into phantom records
+ var id = (feature.state === OpenLayers.State.INSERT) ? undefined : feature.id;
+ records[records.length] = new recordType(values, id);
}
}
More information about the Commits
mailing list