[Users] Problem updating feature attributes using GeoExt.data.FeatureStore and WFS-T

Adam Ratcliffe adam at prema.co.nz
Tue May 11 08:07:50 CEST 2010


Hi,

I have an app where feature attributes can be edited using an
AttributeForm that is synced with a record in an underlying
FeatureStore.  The code that updates the store looks like this:

form.updateRecord(featureStore.getRecordFromFeature(feature));

I observed that although the record and referenced feature are
successfully updated that when I save the owning layer that the
feature is not included in the update request.  Looking into this
further I found that I needed to set the feature state explicitly:

    if(feature.state !== OpenLayers.State.INSERT) {
        feature.state = OpenLayers.State.UPDATE;
    }

Is this something that the FeatureStore could be configured to do
internally in the onUpdate() handler?

Cheers
Adam


More information about the Users mailing list