I built an WFS-T with a grid panel (Ext.grid.EditorGridPanel) to edit features' attributes. Now, I want the feature store (GeoExt.data.FeatureStore) to reload/update automatically so that other users see changes committed immediately without reloading the whole webmap.

I would appreciate hints for:

  1. Attaching such an "update store" function either to my "save"-button or to my store's "afteredit"-listener
  2. Having the whole store updated continuously in an automatic way

Solved! ..by using refresh Strategy:

var refreshStrategy = new OpenLayers.Strategy.Refresh();

2.Apply strategy to WFS-Layer:
var POIs = new OpenLayers.Layer.Vector("Schneeampel", { strategies: [new OpenLayers.Strategy.Fixed(), saveStrategy, refreshStrategy], projection: WGS84, // empty style map, will be populated in setLayerStyles protocol: new OpenLayers.Protocol.WFS({...

3.Register event "refresh" in combination with event "save" in Save-Button-section:
saveStrategy.events.register("success", null, function(){refreshStrategy.refresh()})

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.