[OpenLayers-Commits] r7108 - sandbox/vector-behavior/lib/OpenLayers/Protocol/WFS

commits at openlayers.org commits at openlayers.org
Thu May 8 13:24:07 EDT 2008


Author: sbenthall
Date: 2008-05-08 13:24:07 -0400 (Thu, 08 May 2008)
New Revision: 7108

Modified:
   sandbox/vector-behavior/lib/OpenLayers/Protocol/WFS/v1_0_0.js
Log:
Switch from OL.Ajax.Request to OL.Request for wfs protocol.commit

Modified: sandbox/vector-behavior/lib/OpenLayers/Protocol/WFS/v1_0_0.js
===================================================================
--- sandbox/vector-behavior/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2008-05-08 16:56:34 UTC (rev 7107)
+++ sandbox/vector-behavior/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2008-05-08 17:24:07 UTC (rev 7108)
@@ -211,11 +211,11 @@
         
         var data = this.format.write(root);
         
-        new OpenLayers.Ajax.Request(this.url,
-                                  {method: 'post', 
-                                   postBody: data,
-                                   onComplete: OpenLayers.Console.log //quick fix
-                                   });
+        return OpenLayers.Request.POST({
+            url: this.url,
+            callback: OpenLayers.Console.log, //quick fix,
+            data: data
+        });      
     },
     
     /**
@@ -257,7 +257,7 @@
         var node = this.format.createElementNSPlus("wfs:Insert");
 
         // TODO: this should deal with alt formats
-        node.appendChild(this.layer.format.createFeatureXML(feature).firstChild);
+        node.appendChild(this.layer.format.createFeatureXML(feature,true));
 
         return node;
     },
@@ -279,7 +279,7 @@
         var value = this.format.createElementNSPlus("wfs:Value");
         
         // TODO: this should work with alt formats.
-        var geom = this.layer.format.buildGeometryNode(feature.geometry);
+        var geom = this.format.buildGeometryNode(feature.geometry);
         
         // TODO: deal with this elsewhere
         geom.setAttribute("srsName", feature.layer.projection.getCode());



More information about the Commits mailing list