<font size=2 face="Arial">Hi all,</font>
<br>
<br><font size=2 face="Arial">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”
</font><a href=http://workshops.opengeo.org/geoext/wfs/grid.html><font size=2 color=blue face="Arial"><u>http://workshops.opengeo.org/geoext/wfs/grid.html</u></font></a><font size=2 face="Arial">.</font>
<br>
<br><font size=2 face="Arial">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.</font>
<br>
<br><font size=2 face="Arial">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</font>
<br>
<p><font size=2 face="Arial">My code is as follows:</font>
<br>
<br>
<br><font size=2 face="Arial">function setLayer(model, node) {</font>
<br><font size=2 face="Arial"> </font>
<br><font size=2 face="Arial">
if(!(node && node.layer instanceof
OpenLayers.Layer.WMS)) {</font>
<br><font size=2 face="Arial">
return;</font>
<br><font size=2 face="Arial">
}</font>
<br><font size=2 face="Arial">
selectedLayer = null;</font>
<br><font size=2 face="Arial">
vectorLayer.removeAllFeatures();</font>
<br><font size=2 face="Arial">
app.featureGrid.reconfigure( new Ext.data.Store(),new
Ext.grid.ColumnModel([]) );</font>
<br><font size=2 face="Arial"> var layer = node.layer;</font>
<br><font size=2 face="Arial">
var url = layer.url.split("?")[0];</font>
<br><font size=2 face="Arial">
alert("capa seleccionada: " + layer.params.LAYERS);</font>
<br><font size=2 face="Arial">
schema = new GeoExt.data.AttributeStore({</font>
<br><font size=2 face="Arial">
</font>
<br><font size=2 face="Arial">
url: url,</font>
<br><font size=2 face="Arial">
baseParams: {</font>
<br><font size=2 face="Arial">
"SERVICE": "WFS",</font>
<br><font size=2 face="Arial">
"REQUEST": "DescribeFeatureType",</font>
<br><font size=2 face="Arial">
"VERSION": "1.1.0",</font>
<br><font size=2 face="Arial">
"TYPENAME": layer.params.LAYERS</font>
<br><font size=2 face="Arial">
},</font>
<br><font size=2 face="Arial">
</font>
<br><font size=2 face="Arial">
autoLoad:
true,</font>
<br><font size=2 face="Arial">
listeners:
{</font>
<br><font size=2 face="Arial">
load : function(store, records, index) {</font>
<br><font size=2 face="Arial">
alert ("load");</font>
<br><font size=2 face="Arial">
app.featureGrid.setTitle(layer.name);</font>
<br><font size=2 face="Arial">
selectedLayer
= layer;</font>
<br><font size=2 face="Arial">
configureGrid(store,
url);</font>
<br><font size=2 face="Arial">
}</font>
<br><font size=2 face="Arial">
} //listeners</font>
<br><font size=2 face="Arial">
</font>
<br><font size=2 face="Arial">
}); // final de
schema</font>
<br><font size=2 face="Arial"> }</font>