<font size=2 face="Arial">Thank very much for yoyr help,</font>
<br>
<br><font size=2 face="Arial">I put a proxy that makes my wfs available
at a url relative to my application, but </font>
<br><font size=2 face="Arial">the problem is that when I try to load
the attribute store gives me the following error</font>
<br><font size=2 face="Arial">:</font>
<br><font size=2 face="Arial">"Error reading XML: location element
not found: moz-nullprincipal: {3d64a956-5d9c-465e-87c0-1cae90cac057} number
of line 1, column 1:"</font>
<br>
<br><font size=2 face="Arial">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>
<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">
proxy: new GeoExt.data.ProtocolProxy({
</font>
<br><font size=2 face="Arial">
protocol: new OpenLayers.Protocol.HTTP({
</font>
<br><font size=2 face="Arial">
url: "</font><a href="http://localhost:8080/geoserver/visor/wms?SERVICE=WFS&REQUEST=DescribeFeatureType&VERSION=1.1.0&TYPENAME="><font size=2 face="Arial">http://localhost:8080/geoserver/visor/wms?SERVICE=WFS&REQUEST=DescribeFeatureType&VERSION=1.1.0&TYPENAME=</font></a><font size=2 face="Arial">"
+ layer.params.LAYERS ,</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">
})
</font>
<br><font size=2 face="Arial">
</font>
<br><font size=2 face="Arial">
}); // final de
schema</font>
<br><font size=2 face="Arial">
schema.load();</font>
<br><font size=2 face="Arial"> };</font>
<br><font size=2 face="Arial"> </font>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br><font size=2 face="Arial">Best regards,</font>
<br><font size=2 face="Arial">José Carlos</font>
<br>
<br>
<br>
<br><font size=1 color=#5f5f5f face="sans-serif">De:
</font><font size=1 face="sans-serif">Andreas Hocevar <ahocevar@opengeo.org></font>
<br><font size=1 color=#5f5f5f face="sans-serif">Para:
</font><font size=1 face="sans-serif">jcortega@dipalme.org</font>
<br><font size=1 color=#5f5f5f face="sans-serif">cc:
</font><font size=1 face="sans-serif">users@geoext.org</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Fecha:
</font><font size=1 face="sans-serif">27/06/2012 10:46</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Asunto:
</font><font size=1 face="sans-serif">Re: [Users]
Do not work me the DescribeFeatureType query to create a Attribute Store</font>
<br><font size=1 color=#5f5f5f face="sans-serif">Enviado por:
</font><font size=1 face="sans-serif">andreas.hocevar@gmail.com</font>
<br>
<hr noshade>
<br>
<br>
<br><tt><font size=2>Are you using a GeoServer url different than '/geoserver/ows'
or<br>
'/geoserver/wfs', like e.g. 'http://myhost:8080/geoserver/wfs'? If so,<br>
then your request will be blocked by the browser's Same Origin Policy.<br>
In this case you will need a proxy that makes your wfs available at a<br>
url relative to your application.<br>
<br>
Andreas.<br>
<br>
On Wed, Jun 27, 2012 at 10:36 AM, <jcortega@dipalme.org> wrote:<br>
> Hi all,<br>
><br>
> I'm following the tutorial “Developing OGC Compliant Web Applications
with<br>
> Geoext” and I have some problem with the second lesson 3.1 “ Creating
a<br>
> Synchronized Grid and Map View of WFS Features”<br>
> </font></tt><a href=http://workshops.opengeo.org/geoext/wfs/grid.html><tt><font size=2>http://workshops.opengeo.org/geoext/wfs/grid.html</font></tt></a><tt><font size=2>.<br>
><br>
> I'm trying to create a gridpanel in Geoext, that must be filled with
the<br>
> names of the fields from an AttributeStore and then create their own<br>
> FeatureStore with the values of these fields and update the grid panel.<br>
><br>
> The problem is that when I select a layer and execute the funcion
setLayer<br>
> that create the attribute sotore (schema), no execute never
the listener<br>
> load and therefore I can not get the name of fields<br>
><br>
> My code is as follows:<br>
><br>
><br>
> function setLayer(model, node) {<br>
><br>
> if(!(node
&& node.layer instanceof OpenLayers.Layer.WMS)) {<br>
>
return;<br>
> }<br>
> selectedLayer
= null;<br>
> vectorLayer.removeAllFeatures();<br>
> app.featureGrid.reconfigure(
new Ext.data.Store(),new<br>
> Ext.grid.ColumnModel([]) );<br>
> var layer = node.layer;<br>
> var url =
layer.url.split("?")[0];<br>
> alert("capa
seleccionada: " + layer.params.LAYERS);<br>
> schema = new
GeoExt.data.AttributeStore({<br>
><br>
>
url:
url,<br>
>
baseParams: {<br>
><br>
> "SERVICE": "WFS",<br>
><br>
> "REQUEST": "DescribeFeatureType",<br>
><br>
> "VERSION": "1.1.0",<br>
><br>
> "TYPENAME": layer.params.LAYERS<br>
>
},<br>
><br>
>
autoLoad:
true,<br>
>
listeners:
{<br>
>
load :<br>
> function(store, records, index) {<br>
><br>
> alert ("load");<br>
><br>
> app.featureGrid.setTitle(layer.name);<br>
><br>
> selectedLayer = layer;<br>
><br>
> configureGrid(store, url);<br>
><br>
>
}<br>
>
} //listeners<br>
><br>
> });
// final de schema<br>
> }<br>
><br>
><br>
> _______________________________________________<br>
> Users mailing list<br>
> Users@geoext.org<br>
> </font></tt><a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users"><tt><font size=2>http://www.geoext.org/cgi-bin/mailman/listinfo/users</font></tt></a><tt><font size=2><br>
><br>
<br>
<br>
<br>
-- <br>
Andreas Hocevar<br>
OpenGeo - </font></tt><a href=http://opengeo.org/><tt><font size=2>http://opengeo.org/</font></tt></a><tt><font size=2><br>
Expert service straight from the developers.<br>
</font></tt>
<br>