[Users] Sorting with a reconfigured Grid
Daniel Kastl
daniel at georepublic.de
Mon Feb 8 16:56:52 CET 2010
Hi Sascha,
ExtJS sorting takes three parameters if I remember well.
But these three parameters are not part of WFS standard nor they are
special Geoserver parameters (at least they were not, when I tried
more or less the same as you half a year ago).
Daniel
2010/2/8 Sascha Müller <s.mueller76 at arcor.de>:
> Hi all,
>
> I use a Grid (see below) to show attributes from wfs-Layers. The grid is
> reconfigured everytime after a new Layer is chosen.
>
> var gridPanel = new Ext.grid.GridPanel({
> id: 'fg',
> title: "Attribute",
> region: "south",
> stripeRows: true,
> height: 200,
> split: false,
> collapsible: true,
> collapsed: true,
> sortable: false,
> store: dummyFeatureStore,
> columns: [],
> loadMask: {
> msg: "Attribute werden geladen ...",
> store: dummyFeatureStore
> },
> sm: new GeoExt.grid.FeatureSelectionModel({
> layer: wfsStoreLayer
> })
> });
>
> I reconfigure the Grid this way:
>
> featureStore = new GeoExt.data.FeatureStore({
> layer: wfsStoreLayer,
> proxy: new GeoExt.data.ProtocolProxy({
> remoteSort: true,
> protocol: new OpenLayers.Protocol.WFS({
> url: geoserverURL + wfsURL,
> featureType: theLayer,
> featureNS: "http://www.vbl.ch",
> featurePrefix: "VBL",
> srsName: "EPSG:21781",
> version: "1.1.0"
> })
> })
> });
> featureStore.reader = new GeoExt.data.FeatureReader({}, recordize(fields));
> gridPanel.reconfigure(featureStore, new
> Ext.grid.ColumnModel(columnize(fields)) );
>
> ...
>
> function reloadFeatureStore() {
> featureStore.load({
> callback: function(response){
> wfsStoreLayer.setVisibility(true);
> },
> scope: this
> });
> }
>
> This works fine, but now the sorting doesn't work. I'm not sure where I
> have to look for.
> Is it generally possible if the data is coming from the Server
> (GeoServer)? I use GeoExt 0.6.
> How about paging? Is there something the sorting and paging have in common?
>
> Thanks for any Idea.
>
> Sascha
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
--
Georepublic UG (haftungsbeschränkt)
Salzmannstraße 44,
81739 München, Germany
eMail: daniel.kastl at georepublic.de
Web: http://georepublic.de
Tel: +49 (089) 4161 7698-1
Fax: +49 (089) 4161 7698-9
Commercial register: Amtsgericht München, HRB 181428
CEO: Daniel Kastl
More information about the Users
mailing list