From 2b55af61b919192de0a0cc8f100ba1d935b58d78 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Mon, 5 Nov 2007 16:02:29 +0000 Subject: [PATCH] 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 --- lib/OpenLayers/Format/WFS.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index 6b97fa6f53..b5da94773c 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -155,8 +155,8 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { * feature - {} */ 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);