How to handle add feature event in the FeatureLayer and Editor

515
0
05-03-2011 05:42 AM
KirillLykov
New Contributor
I use a FeatureLayer created from the featureCollection. I also use esri.dijit.editing.Editor to add a feature to the map. Every time feature has been added to this layer I want to send it to my remote service using rest API. I tried to use FeatureLayer's onEditsComplete event:
dojo.connect(this._mapwrapper._operationalFLayer, "onEditsComplete", function(edits, updates, deletes) {
    var xhrArgs = {
            url: "http://XXXX/add",
            handleAs: "json",
            preventCache: true,
            content: {
                geometry: "....",
                text: "...."
            }
        };
     dojo.xhrGet(xhrArgs);
});

But it fires before user has entered information in the dialog created when user clicks on the map. So it seems useless. Do you know how to specify that mentioned action shall be done after user entered text in the editor's dialog?
0 Kudos
0 Replies