<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>I&#39;ve a map generated through OpenLayers. I&#39;m using GeoExt to generate a tree of layers loaded from Geoserver that at the same time is loaded from a PostGIS database. I&#39;ve developed that when the user click over the layer in the map a popup is displayed with the feature information, then I&#39;ve added a button to the popup because of the user change some value of the feature to save it in the database.<br>
<br>However, it isn&#39;t working:<br><br></div>To show the feature information in the popup I call to the function OpenLayers.Control.WMSGetFeatureInfo and It wait the event &quot;getfeatureinfo&quot;. So, once the user click in the layer the popup is displayed with the save button. The user click in the button and the handler event is triggered with the next code:<br>
<br>var capa = new OpenLayers.Protocol.WFS({<br>    url: &quot;/geoserver/ows&quot;,<br>    version: &quot;1.1.0&quot;,<br>    featureType: &quot;aicp&quot;,<br>    featureNS: &quot;<a href="http://OceanliderRestricciones">http://OceanliderRestricciones</a>&quot;,<br>
    srsName: &quot;EPSG:4326&quot;<br>});<br><br>capa.commit(e.features);<br><br></div>&quot;aicp&quot; is the name of the layer I&#39;m using to test it.<br></div>&quot;<a href="http://OceanliderRestricciones">http://OceanliderRestricciones</a>&quot; is the URI of the workspace.<br>
</div>&quot;e&quot; is the variable received as parameter when &quot;getfeatureinfo&quot; event is triggered.<br><br></div>A post request is send with the next content:<br><br><div class=""><div class=""><span class="">&lt;<span class="">wfs:Transaction</span><span class=""> <span class="">xmlns:wfs</span>=&quot;<span class=""><a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a></span>&quot;</span><span class=""> <span class="">service</span>=&quot;<span class="">WFS</span>&quot;</span><span class=""> <span class="">version</span>=&quot;<span class="">1.1.0</span>&quot;</span><span class=""> <span class="">xsi:schemaLocation</span>=&quot;<span class=""><a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">http://schemas.opengis.net/wfs/1.1.0/wfs.xsd</a></span>&quot;</span><span class=""> <span class="">xmlns:xsi</span>=&quot;<span class=""><a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a></span>&quot;</span><span class="">&gt;</span></span></div>
<div class="">&lt;/<span class="">wfs:Transaction</span>&gt;<br><br></div><div class="">This is wrong because it hasn&#39;t what to do, I mean, It isn&#39;t saying what to do (update, insert, delete).<br><br>I would appreciate your help.<br>
<br></div><div class="">Thanks,<br><br>FNK.<br><br></div><div class="">PD: I&#39;ve used this tutorial: <b><a href="http://workshops.opengeo.org/geoext/wfs/wfst.html">http://workshops.opengeo.org/geoext/wfs/wfst.html</a><br>
</b>It works but I don&#39;t know how to adapt it to my code.<br></div></div><br></div>