<p class="MsoNormal">Hello everyone: </p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><span lang="EN-GB">I am driving
mad with this problem. I am doing a web application with OpenLayers, ExtJs and
GeoExt and the simple fact to load values in a combo have become hard. </span></p>
<p class="MsoNormal"><span lang="EN-GB">Step1: I
have defined a featurestore that stores the records from a layer in Geoserver.
No problem to load these items in a GeoExt gridPanel. This store has been
generated with this code:</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">----</span></p>
<p class="MsoNormal"><span lang="EN-GB">store = new
GeoExt.data.FeatureStore({</span></p>
<p class="MsoNormal"><span lang="EN-GB"> layer: wfslayer,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> fields: [</span></p>
<p class="MsoNormal"><span lang="EN-GB"> {name:
'PLANT', type: 'string'},</span></p>
<p class="MsoNormal"><span lang="EN-GB"> {name: ‘COUNTRY’, type: ‘string’},</span></p>
<p class="MsoNormal"><span lang="EN-GB"> {name: ‘STATUS', type: 'string'},</span></p>
<p class="MsoNormal"><span lang="EN-GB"> {name: 'long', type: 'float'}, </span></p>
<p class="MsoNormal"><span lang="EN-GB"> {name: 'lat', type: 'float'},</span></p>
<p class="MsoNormal"><span lang="EN-GB"> ],</span></p>
<p class="MsoNormal"><span lang="EN-GB"> proxy: new GeoExt.data.ProtocolProxy({</span></p>
<p class="MsoNormal"><span lang="EN-GB"> protocol: new OpenLayers.Protocol.WFS({</span></p>
<p class="MsoNormal"><span lang="EN-GB"> //version: "1.0.0",</span></p>
<p class="MsoNormal"><span lang="EN-GB"> srsName: 'EPSG:900913', </span></p>
<p class="MsoNormal"><span lang="EN-GB"> url:
"<a href="http://localhost:8080/geoserver/wfs">http://localhost:8080/geoserver/wfs</a>",</span></p>
<p class="MsoNormal"><span lang="EN-GB"> featureNS:
'<a href="http://localhost:8080/wfs">http://localhost:8080/wfs</a>',</span></p>
<p class="MsoNormal"><span lang="EN-GB"> featurePrefix:
nomPrefix,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> featureType:
nomLayer,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> geometryName:
nomGeometry,</span></p>
<p class="MsoNormal"><span lang="EN-GB"> schema: <a href="http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&typename=lonlat22">http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&typename=lonlat22</a>"</span></p>
<p class="MsoNormal"><span lang="EN-GB"> })</span></p>
<p class="MsoNormal"><span lang="EN-GB"> }), </span></p>
<p class="MsoNormal"><span lang="EN-GB"> autoLoad:
true</span></p>
<p class="MsoNormal"><span lang="EN-GB"> });</span></p>
<p class="MsoNormal"><span lang="EN-GB">--</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">This store
has records with fields (COUNTRY) that contains repeated values and I would
like to filter that store by this field: COUNTRY. For that, I have created a
ComboBox and I am trying to show only “no repeated” values but no success. </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">var
combo1=new Ext.form.ComboBox({ </span></p>
<p class="MsoNormal"><span lang="EN-GB"> fieldLabel:'Filtro
Pais', </span></p>
<p class="MsoNormal"><span lang="EN-GB"> name:'cmb-P', </span></p>
<p class="MsoNormal"><span lang="EN-GB"> forceSelection:
true, </span></p>
<p class="MsoNormal"><span lang="EN-GB"> store:
store, </span></p>
<p class="MsoNormal"><span lang="EN-GB"> emptyText:'Escoge
un país', </span></p>
<p class="MsoNormal"><span lang="EN-GB"> triggerAction:
'all', </span></p>
<p class="MsoNormal"><span lang="EN-GB"> //allQuery:
'DISTINCT',</span></p>
<p class="MsoNormal"><span lang="EN-GB"> editable:false, </span></p>
<p class="MsoNormal"><span lang="EN-GB"> displayField:'COUNTRY', </span></p>
<p class="MsoNormal"><span lang="EN-GB"> valueField:
'COUNTRY' </span></p>
<p class="MsoNormal"><span lang="EN-GB"> }); </span></p>
<p class="MsoNormal"><span lang="EN-GB">This combo
shows a list of all (repeated) values from store. This a question of ExtJS
forum but I would appreciate if anyone knew how to filter it out. </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Once a
country is selected from combo, I would like to be shown the STATUS associated
to that selected COUNTRY. This is a question of anidated combos but I don’t know
how to ‘featurefilter’ config tag would be entered in this problem. </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Any ideas? </span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks in
advanced</span></p>
<p class="MsoNormal"><span lang="EN-GB"> </span></p>
<p class="MsoNormal"><span lang="EN-GB">Jorge</span></p>