[Users] Shapefile store: how to display in grid?

Robert Buckley robertdbuckley at yahoo.com
Mon Oct 25 11:01:39 CEST 2010


Hi,

i have been trying to do something very simple. I just want to display one 
shapefile´s attributes in a grid. Firebug for some reason loads the "post wfs" 
part twice. The first lists the attributes when I look in firbug > net > xml , 
the second gives this exeption.

<ows:exceptionreport version="1.0.0" 
xsi:schemaLocation="http://www.opengis.net/ows 
http://maps.zgb.de:8080/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:ows="http://www.opengis.net/ows">
  <ows:exception exceptionCode="MissingParameterValue" locator="request">
    <ows:exceptiontext>Could not determine geoserver request from http request 
POST /geoserver/wfs HTTP/1.1
Host: maps.zgb.de:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.11) 
Gecko/20101012 Firefox/3.6.11 ( .NET CLR 3.5.30729)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: 
de,de-DE;q=0.9,en-US;q=0.9,en;q=0.8,en-gb;q=0.8,es-ES;q=0.7,es;q=0.7,en-bwwg;q=0.6,de-de;q=0.6,nl-NL;q=0.5,nl;q=0.4,ro-RO;q=0.4,ro;q=0.3,it-IT;q=0.3,it;q=0.2,de;q=0.2,en-us;q=0.1,en;q=0.1

Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
Referer: http://maps.zgb.de:8080/geoserver/www/zgb_energie/statistik.html
Cookie: JSESSIONID=1s7f21rmgijtj
Pragma: no-cache
Cache-Control: no-cache
If-Modified-Since: Thu Jan 01 1970 01:00:00 GMT+0100
Content-Type: application/xml
Content-Length: 0

</ows:exceptiontext>
  </ows:exception>
</ows:exceptionreport>


I can´t understand why the grid isn´t being filled?

Here is my simple test code:

<script type="text/javascript">

Ext.BLANK_IMAGE_URL = "../ext/resources/images/default/s.gif";

Ext.onReady(function() {

                var store = new GeoExt.data.FeatureStore({
                fields: [
                     {name: "Bez", type: "string", defaultValue: 0}
                ],
                proxy: new GeoExt.data.ProtocolProxy({
                    protocol: new OpenLayers.Protocol.WFS({
                        url: "/geoserver/wfs",
                        version: "1.1.0",
                        featureType: "WEA_wgs84",
                        featureNS: "http://www.zgb.de/",
                        srsName: "EPSG:4326"
                    })
                }),
                autoLoad: true
            });

            var gridPanel = new Ext.grid.GridPanel({
                title: "Feature Table - Medford Parks",
                region: "center",
                viewConfig: {forceFit: true},
                store: store,
                cm: new Ext.grid.ColumnModel({
                    defaults: {
                        sortable: true
                    },
                    columns: [
                        {header: "Bez", dataIndex: "Bez"}
                    ]
                })
            });

            var mainPanel = new Ext.Panel({
                renderTo: document.body,
                layout: "border",
                height: 450,
                width: 800,
                items: [gridPanel]
            });


      });
</script>

can anyone see why the grid isn´t being filled?


thanks,

Robert Buckley





More information about the Users mailing list