Select to view content in your preferred language

Feature service does not update after feature is deleted/attributes updated

606
2
05-20-2011 12:10 PM
JakeSkinner
Esri Esteemed Contributor
I am using Flex 2.2 and I'm having an issue where a feature service in the web application will not update after a delete or attribute change has occurred.  If a feature is added, the feature service will update correctly in the web application.

For example, I open a flex app with a feature service.  I have the same feature service being consumed on my mobile device using ArcGIS Mobile.  I'll collect a feature using ArcGIS Mobile and then post the edit back to database.  Next I pan/zoom around the flex app and the feature service updates dynamically and I can see the feature.

However, if I delete a feature or update attributes of an existing feature using ArcGIS Mobile, post changes back to database, and then pan/zoom around the changes are not reflected.  I have to refresh the entire flex app.  After doing so the changes are reflected.

The same happens no matter which client I'm using to update the service.  For example if I make a delete/update to the feature class in ArcMap I have to refresh the flex app.

I tried setting 'mode' equal to 'onDemand' in the config file, but this did not make a difference.

Has anyone experienced this? 

Thanks!
Tags (2)
0 Kudos
2 Replies
BjornSvensson
Esri Regular Contributor
The application does not know that the data behind the feature layer has been updated.  You can refresh it (too re-grab the data) by using the refresh method:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#methodSummary
0 Kudos
PremRadhakrishnan
New Contributor III
The application does not know that the data behind the feature layer has been updated.  You can refresh it (too re-grab the data) by using the refresh method:
http://help.arcgis.com/en/webapi/flex/apiref/com/esri/ags/layers/FeatureLayer.html#methodSummary


I am having the same issue, I tried using refresh and that doesnt work. I have to refresh the page to see the edits. I am also using a definition query on the featurelayer so I am not sure if that has anything to do with it.
0 Kudos