Hi<div>I was in Foss4G Barcelona and got this great tutorial on GeoExt Editng.</div><div>And it works very well on shape-files in geoserver.</div><div>But we want to use postGIS and have tried to make a testtable like this.</div>
<div><br></div><div><div> Column |         Type          |</div><div>Modifiers                           </div><div>--------+-----------------------+---------------------------------------</div><div>--------+-----------------------+-----------------------</div>
<div> fid    | integer               | not null default</div><div>nextval(&#39;test.wfstrans2_fid_seq&#39;::regclass)</div><div> info   | character varying(40) | </div><div> geo    | geometry              | </div><div>Indexes:</div>
<div>    &quot;wfstrans2_pkey&quot; PRIMARY KEY, btree (fid)</div><div>    &quot;geoidx_test__wfstrans2&quot; gist (geo)</div><div>Check constraints:</div><div>    &quot;enforce_dims_geo&quot; CHECK (st_ndims(geo) = 2)</div>
<div>    &quot;enforce_geotype_geo&quot; CHECK (geometrytype(geo) = &#39;POLYGON&#39;::text OR geo IS NULL)</div><div>    &quot;enforce_srid_geo&quot; CHECK (st_srid(geo) = 32632)</div></div><div><br></div><div><br></div>
<div>The client posts this:</div><div><br></div><div><code class="focusRow subFocusRow ">&lt;wfs:Transaction xmlns:wfs=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a>&quot; service=&quot;WFS&quot; version=&quot;1.0.0&quot; xsi:schemaLocation</code><code class="focusRow subFocusRow ">=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd</a>&quot; xmlns:xsi=&quot;http</code><code class="focusRow subFocusRow ">://<a href="http://www.w3.org/2001/XMLSchema-instance">www.w3.org/2001/XMLSchema-instance</a>&quot;&gt;&lt;wfs:Insert&gt;&lt;feature:wfstrans2 xmlns:feature=&quot;<a href="http://www.skogoglandskap">http://www.skogoglandskap</a></code><code class="focusRow subFocusRow ">.no&quot;&gt;&lt;feature:geo&gt;&lt;gml:MultiPolygon xmlns:gml=&quot;<a href="http://www.opengis.net/gml">http://www.opengis.net/gml</a>&quot; srsName=&quot;EPSG:32632&quot;&gt;&lt;gml</code><code class="focusRow subFocusRow ">:polygonMember&gt;&lt;gml:Polygon&gt;&lt;gml:outerBoundaryIs&gt;&lt;gml:LinearRing&gt;&lt;gml:coordinates decimal=&quot;.&quot; cs=&quot;,&quot;</code><code class="focusRow subFocusRow "> ts=&quot; &quot;&gt;523671.86,6839648 447847.86,6788196 558875.86,6790904 523671.86,6839648&lt;/gml:coordinates&gt;&lt;/gml</code><code class="focusRow subFocusRow ">:LinearRing&gt;&lt;/gml:outerBoundaryIs&gt;&lt;/gml:Polygon&gt;&lt;/gml:polygonMember&gt;&lt;/gml:MultiPolygon&gt;&lt;/feature:geo</code><code class="focusRow subFocusRow ">&gt;&lt;feature:info&gt;test1&lt;/feature:info&gt;&lt;/feature:wfstrans2&gt;&lt;/wfs:Insert&gt;&lt;/wfs:Transaction&gt;</code></div>
<div><code class="focusRow subFocusRow "><br></code></div><div><code class="focusRow subFocusRow "><br></code></div><div><code class="focusRow subFocusRow ">And i get this errormessage:</code></div><div><code class="focusRow subFocusRow "><br>
</code></div><div><code class="focusRow subFocusRow "><div selected class="netInfoResponseText netInfoText "><pre><code tabindex="0" class="wrappedText focusRow a11yModified">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&lt;wfs:WFS_TransactionResponse version=&quot;1.0.0&quot; xmlns:wfs=&quot;http:/</code><code class="wrappedText focusRow">/<a href="http://www.opengis.net/wfs">www.opengis.net/wfs</a>&quot; xmlns:ogc=&quot;<a href="http://www.opengis.net/ogc">http://www.opengis.net/ogc</a>&quot; xmlns:xsi=&quot;<a href="http://www.w3.org/2001/XMLSchema-instance">http://www.w3.org/2001/XMLSchema-instance</a>&quot;</code><code class="wrappedText focusRow"> xsi:schemaLocation=&quot;<a href="http://www.opengis.net/wfs">http://www.opengis.net/wfs</a> <a href="http://kartutv7:80/geoserver_intern/schemas/wfs/1.0.0">http://kartutv7:80/geoserver_intern/schemas/wfs/1.0.0</a></code><code class="wrappedText focusRow">/WFS-transaction.xsd&quot;&gt;&lt;wfs:InsertResult&gt;&lt;ogc:FeatureId fid=&quot;none&quot;/&gt;&lt;/wfs:InsertResult&gt; &lt;wfs:TransactionResult</code><code tabindex="-1" class="wrappedText focusRow a11yModified">&gt; &lt;wfs:Status&gt; &lt;wfs:FAILED/&gt; &lt;/wfs:Status&gt; &lt;wfs:Message&gt;Error performing insert&lt;/wfs:Message&gt; &lt;/wfs:TransactionResult</code><code class="wrappedText focusRow">&gt;&lt;/wfs:WFS_TransactionResponse&gt;</code></pre>
<pre><code class="wrappedText focusRow"><br></code></pre><pre><code class="wrappedText focusRow">My wfs_editor.html looks like this:</code></pre><pre><code class="wrappedText focusRow">

</code>&lt;html&gt;
    &lt;head&gt;
        &lt;title&gt;GeoExt WFS Editor&lt;/title&gt;

        &lt;script type=&quot;text/javascript&quot; src=&quot;ext/adapter/ext/ext-base.js&quot;&gt;&lt;/script&gt;
        &lt;script type=&quot;text/javascript&quot; src=&quot;ext/ext-all.js&quot;&gt;&lt;/script&gt;
        &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;ext/resources/css/ext-all.css&quot; /&gt;
        &lt;script src=&quot;openlayers/lib/OpenLayers.js&quot;&gt;&lt;/script&gt;

        &lt;script type=&quot;text/javascript&quot; src=&quot;geoext/lib/GeoExt.js&quot;&gt;&lt;/script&gt;

        &lt;script type=&quot;text/javascript&quot;&gt;
        Ext.BLANK_IMAGE_URL = &quot;ext/resources/images/default/s.gif&quot;;

        Ext.onReady(function() {
                                                         
                        /*var saveStrategy = new OpenLayers.Strategy.Save({
                                onCommit: function() {
                                        saveStrategy.layer.refresh();
                                }
                        });*/
                        var saveStrategy = new OpenLayers.Strategy.Save();
                        var baseLayer = new OpenLayers.Layer.WMS( &quot;Gråtone&quot;, &quot;<a href="http://kart7.skogoglandskap.no/bakgrunn/wms.topo2.graatone">http://kart7.skogoglandskap.no/bakgrunn/wms.topo2.graatone</a>&quot;,
                                        {layers: &#39;topo2_graatone_WMS&#39;, &#39;format&#39;:&#39;image/png&#39;, &#39;transparent&#39;:&#39;false&#39; },
                                        {isBaseLayer: true, singleTile: true, buffer:0,ratio:1});

                        var layer = new OpenLayers.Layer.Vector(&quot;vector&quot;, {
                                strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy],
                                //strategies: [new OpenLayers.Strategy.Fixed()],
                                protocol: new OpenLayers.Protocol.WFS({
                                        url: &quot;/geoserver_intern/wms&quot;,
                                        version: &quot;1.0.0&quot;,
                                        geometryName: &quot;geo&quot;,
                                        featureType: &quot;wfstrans2&quot;,
                                        featureNS: &quot;<a href="http://www.skogoglandskap.no">http://www.skogoglandskap.no</a>&quot;,
                                        srsName: &quot;EPSG:32632&quot;
                                })
                        });

            var store = new GeoExt.data.FeatureStore({
                fields: [
                    {name: &quot;info&quot;, type: &quot;string&quot;}/*,
                                        {name: &quot;fid&quot;, type: &quot;int&quot;}*/
                ],
                layer: layer,
                                addFeatureFilter: function(feature) {
                                        return feature.state !== OpenLayers.State.DELETE;
                                }

            });
                        
                        var drawControl = new OpenLayers.Control.DrawFeature(
                                layer,
                                OpenLayers.Handler.Polygon,
                                {handlerOptions: {multi: true}}
                        );

                        
                        var mapPanel = new GeoExt.MapPanel({
                                title: &quot;Map&quot;,
                                region: &quot;west&quot;,
                                width: 400,
                                layers: [baseLayer,layer],
                                //extent: new OpenLayers.Bounds(234758, 6402776, 1339075, 8020511),
                                map: {
                                        projection: new OpenLayers.Projection(&quot;EPSG:32632&quot;),
                                        displayProjection: new OpenLayers.Projection(&quot;EPSG:32632&quot;),
                                        maxExtent: new OpenLayers.Bounds(-570684.15,6424344.35,1596363.87,7964447.65),
                                        units: &quot;m&quot;,
                                        maxResolution: 2708.0, 
                                          numZoomLevels: 15, 
                                        controls: [  new OpenLayers.Control.PanZoomBar(),
                        new OpenLayers.Control.MousePosition({&#39;prefix&#39;:&#39;UTM 32: &#39;,&#39;numDigits&#39;:0})
                                        ]
                                },
                                bbar: [
                                        new GeoExt.Action({
                                                control: drawControl,
                                                text: &quot;Create&quot;,
                                                enableToggle: true
                                        }), {
                                                text: &quot;Delete&quot;,
                                                handler: function() {
                                                        gridPanel.getSelectionModel().each(function(rec) {
                                                                var feature = rec.get(&quot;feature&quot;);
                                                                modifyControl.unselectFeature(feature);
                                                                store.remove(rec);
                                                                if(feature.state !== OpenLayers.State.INSERT) {
                                                                        feature.state = OpenLayers.State.DELETE;
                                                                        layer.addFeatures([feature]);
                                                                }
                                                        });
                                                }
                                        }, &quot;-&gt;&quot;, {
                                                text: &quot;Save&quot;,
                                                handler: function() {
                                                        store.commitChanges();
                                                        saveStrategy.save();
                                                }
                                        }

                                ]
                        });
                        
                        mapPanel.map.addControl(drawControl);

                        
                        var modifyControl = new OpenLayers.Control.ModifyFeature(layer);
                        mapPanel.map.addControl(modifyControl);
                        modifyControl.activate();



            var gridPanel = new Ext.grid.EditorGridPanel({
                                title: &quot;Feature Table - Manhattan (NY) landmarks&quot;,
                                region: &quot;center&quot;,
                                viewConfig: {forceFit: true},
                                store: store,
                                listeners: {
                                        afteredit: function(e) {
                                                var feature = e.record.get(&quot;feature&quot;);
                                                if(feature.state !== OpenLayers.State.INSERT) {
                                                        feature.state = OpenLayers.State.UPDATE;
                                                }
                                        }
                                },
                                sm: new GeoExt.grid.FeatureSelectionModel({
                                        selectControl: modifyControl.selectControl,
                                        singleSelect: true
                                }),
                                cm: new Ext.grid.ColumnModel({
                                        defaults: {
                                                sortable: true,
                                                editor: {xtype: &quot;textfield&quot;}
                                        },
                                        columns: [
                                                {header: &quot;Info&quot;, dataIndex: &quot;info&quot;}/*,
                                                {header: &quot;Id&quot;, dataIndex: &quot;fid&quot;}*/
                                        ]
                                })
                        });


            var mainPanel = new Ext.Panel({
                renderTo: document.body,
                layout: &quot;border&quot;,
                height: 450,
                width: 800,
                items: [gridPanel, mapPanel]
            });
        });
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body&gt;
    &lt;/body&gt;
&lt;/html&gt;

</pre><pre><code class="wrappedText focusRow"><br></code></pre><pre><code class="wrappedText focusRow"><br></code></pre><pre><code class="wrappedText focusRow">I am running geoserver 2.0.0</code></pre><pre><code class="wrappedText focusRow">Anyone knows whats wrong.</code></pre>
<pre><code class="wrappedText focusRow"><br></code></pre><pre><code class="wrappedText focusRow">Best regards </code></pre><pre><code class="wrappedText focusRow">Viggo Lunde</code></pre><pre><code class="wrappedText focusRow">Skog og landskap</code></pre>
<pre><code class="wrappedText focusRow">Norway</code></pre></div></code></div><div><code class="focusRow subFocusRow "><br></code></div><div><code class="focusRow subFocusRow "><br></code></div><div><code class="focusRow subFocusRow "><br>
</code></div>