Ok, I have a solution: throw an error. It's really bad but it works.dojo.connect(layer, "onBeforeApplyEdits", prepareApplyEdits);
function prepareApplyEdits(adds,updates,deletes) {
 var ok = true;
 if(adds==undefined && updates==undefined && deletes!=undefined){
  if(confirm("Do you really want to delete those elements?")){
                        /** treatement for attributes **/
  }else{
   ok=false;
  }
 }
 if(!ok){
  layer.clearSelection();
  throw new Error();
 }
}I'm really ashamed but it's the only way I found. If anybody has a better idea, he can throw me the rock (or another solution)