feature.attributes={OBJECTID:gr.attributes.OBJECTID, RESP_PERQ:strRespPerq, RESULT:strResultatF, NBR_PLANTS:strNbrPlant, RAISON:strRaison, CONFUSION:strConfusion}; featureLayerFiche.applyEdits(null, [feature], null, new AsyncResponder(onResult, onFault)); function onResult():void { Alert.show("ONRESULT"); } function onFault(info:Object, token:Object = null):void { Alert.show(info.toString()); } // LOAD OF CODE ... // <esri:FeatureLayer id="featureLayerFiche" mode="snapshot" outFields="[OBJECTID, IDFICHE, NM_MUN, UNITE, DISTRICT, DATEFICHE, RESP_PERQ, DATE_PERQ, RESULT, NBR_PLANTS, RAISON, CONFUSION]" selectionComplete="myFeatureLayer_selectionCompleteHandler(event)" editsComplete="featureLayerFiche_EditsCompleteHandler" editsStarting="featureLayerFiche_EditsStartingHandler" fault="featureLayerFiche_FaultHandler" disableClientCaching="true" url="http://myserver123/ArcGIS/rest/services/geocisaille/FeatureServer/1"/> // LOAD OF CODE ... //
Solved! Go to Solution.
Yes, it works with editor, tho I gave up on it since I had no control over the interface.
Are you familiar with the skins of Editor and other components? It gives you a lot of control over the the UI...
Yes, it works with editor, tho I gave up on it since I had no control over the interface.
I don't really know how to check the HTTP requests, is it with HTTPFox or Charle proxy like you said?
Yes, or with Fiddler, etc.
Hello,
Example 1 :
var map = new Map("map", {
basemap: "dark-gray",
zoom: 3,
});
layer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0");
attributes = { objectid: 119369, typdamage: "Update successfully" };
feature = new Graphic( null, null, attributes );
map.addLayer(layer);
map.onLayerAddResult = () => {
layer.applyEdits(null, [feature], null,
function (add, update, del) {
console.log('success', update);
});
};
Exemple 2 :
var map = new Map("map", {
basemap: "dark-gray",
zoom: 3,
});
layer = new FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/DamageAssessment/FeatureServer/0");
attributes = { objectid: 119369, typdamage: "Update successfully" };
feature = new Graphic( null, null, attributes );
map.addLayer(layer);
setTimeout(() => {
layer.applyEdits(null, [feature], null,
function (add, update, del) {
console.log('success', update);
},
function (error) {
console.log('error applyEdits \n', error);
});
}, 2000);
Bertrand