give wfs delete transactions the correct feature.fid - thanks for the review elemoine (closes #1119).

git-svn-id: http://svn.openlayers.org/trunk/openlayers@5113 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
Tim Schaub
2007-11-05 16:02:29 +00:00
parent 1cccb29a3b
commit 2b55af61b9

View File

@@ -155,8 +155,8 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, {
* feature - {<OpenLayers.Feature.Vector>}
*/
remove: function(feature) {
if (!feature.attributes.fid) {
alert("Can't update a feature for which there is no FID.");
if (!feature.fid) {
alert("Can't delete a feature for which there is no FID.");
return false;
}
var deleteNode = document.createElementNS(this.featureNS, 'wfs:Delete');
@@ -164,7 +164,7 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, {
var filterNode = document.createElementNS('http://www.opengis.net/ogc', 'ogc:Filter');
var filterIdNode = document.createElementNS('http://www.opengis.net/ogc', 'ogc:FeatureId');
filterIdNode.setAttribute("fid", feature.attributes.fid);
filterIdNode.setAttribute("fid", feature.fid);
filterNode.appendChild(filterIdNode);
deleteNode.appendChild(filterNode);