[Users] Load combo, FeatureStore and filter values
Jorge Lopez
jorgelopez.physics at gmail.com
Wed Nov 2 11:22:58 CET 2011
Hello everyone:
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.
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:
----
store = new GeoExt.data.FeatureStore({
layer: wfslayer,
fields: [
{name: 'PLANT', type: 'string'},
{name: ‘COUNTRY’, type: ‘string’},
{name: ‘STATUS', type: 'string'},
{name: 'long', type:
'float'},
{name: 'lat', type: 'float'},
],
proxy: new GeoExt.data.ProtocolProxy({
protocol: new OpenLayers.Protocol.WFS({
//version: "1.0.0",
srsName: 'EPSG:900913',
url: "
http://localhost:8080/geoserver/wfs",
featureNS: '
http://localhost:8080/wfs',
featurePrefix: nomPrefix,
featureType: nomLayer,
geometryName: nomGeometry,
schema:
http://localhost:8080/geoserver/wfs?service=WFS&request=DescribeFeatureType&typename=lonlat22
"
})
}),
autoLoad: true
});
--
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.
var combo1=new Ext.form.ComboBox({
fieldLabel:'Filtro Pais',
name:'cmb-P',
forceSelection: true,
store: store,
emptyText:'Escoge un país',
triggerAction: 'all',
//allQuery: 'DISTINCT',
editable:false,
displayField:'COUNTRY',
valueField: 'COUNTRY'
});
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.
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.
Any ideas?
Thanks in advanced
Jorge
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111102/4c9d2450/attachment-0001.htm
More information about the Users
mailing list