I found a way to prevent applyedits from being called. I added to the feature layer a listener on the editsStarting event (a FeatureLayerEvent). When the event is fired, I call the preventDefault() method which prevents applyEdits().But before that I need to recover all the updates that were performed by the user. So I created a FeatureLayerEvent (named myEvent), pointing on my feature layer, and in which I store all the updates of the fired event:
protected function featureLayer_editsStarting(event:FeatureLayerEvent):void
{
for(var i:uint; i<event.updates.length; i++)
{
myEvent.updates.push(event.updates);
}
event.preventDefault();
}
Then when the user clicks on the appropriate button, applyEdits method is called:
protected function validerIti_clickHandler():void
{
myEvent.featureLayer.applyEdits(null, myEvent.updates, null);
myEvent.updates = [];
}
The problem is that when the user clicks on the button to launch applyEdits, the application crashes and the flash editor with it.