Are you using a GeoServer url different than '/geoserver/ows' or '/geoserver/wfs', like e.g. 'http://myhost:8080/geoserver/wfs'? If so, then your request will be blocked by the browser's Same Origin Policy. In this case you will need a proxy that makes your wfs available at a url relative to your application.
Andreas. On Wed, Jun 27, 2012 at 10:36 AM, <[email protected]> wrote: > Hi all, > > I'm following the tutorial “Developing OGC Compliant Web Applications with > Geoext” and I have some problem with the second lesson 3.1 “ Creating a > Synchronized Grid and Map View of WFS Features” > http://workshops.opengeo.org/geoext/wfs/grid.html. > > I'm trying to create a gridpanel in Geoext, that must be filled with the > names of the fields from an AttributeStore and then create their own > FeatureStore with the values of these fields and update the grid panel. > > The problem is that when I select a layer and execute the funcion setLayer > that create the attribute sotore (schema), no execute never the listener > load and therefore I can not get the name of fields > > My code is as follows: > > > function setLayer(model, node) { > > if(!(node && node.layer instanceof OpenLayers.Layer.WMS)) { > return; > } > selectedLayer = null; > vectorLayer.removeAllFeatures(); > app.featureGrid.reconfigure( new Ext.data.Store(),new > Ext.grid.ColumnModel([]) ); > var layer = node.layer; > var url = layer.url.split("?")[0]; > alert("capa seleccionada: " + layer.params.LAYERS); > schema = new GeoExt.data.AttributeStore({ > > url: url, > baseParams: { > > "SERVICE": "WFS", > > "REQUEST": "DescribeFeatureType", > > "VERSION": "1.1.0", > > "TYPENAME": layer.params.LAYERS > }, > > autoLoad: true, > listeners: { > load : > function(store, records, index) { > > alert ("load"); > > app.featureGrid.setTitle(layer.name); > > selectedLayer = layer; > > configureGrid(store, url); > > } > } //listeners > > }); // final de schema > } > > > _______________________________________________ > Users mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
