pchapuis

Control or reset arrays of graphics before applyEdits

Discussion created by pchapuis on Aug 13, 2012
Latest reply on Aug 13, 2012 by pchapuis
API JS 3.0
ArcGIS 10.1
Oracle 11g


I have to intercept objects to add, update or delete before they are sent to server. Because I have to authorize each edit or complete the attributes before they are applied to database.

The featureLayer get an event called onBeforeApplyEdits fired just before the applyEdits function.

This event gives 3 arrays of Graphic : adds, updates and deletes. The attributes of adds and updates can be modified but it seems there is no way to reset one of the 3 arrays in the call of applyEdits (REST request send to the server).

Does anybody knows a way to stop this call? Or maybe to set a check method? I cannot believe there is no way to cancel a delete before it is sent to the server.

Note : I cannot just put an event to my delete button. There is too many action wich calls applyEdits

Thanks by advance

Outcomes