# HG changeset patch # User Torsten Irländer # Date 1372162900 -7200 # Node ID 33aed7dde69f9e6144e07e5ee38e5d7bea9e2fdd # Parent 9b14742a8117fc12532a780491926ec75ed32fec Do not call remove with selection on the store to delete object. Trigger manual delete request as we need to build a custom id. diff -r 9b14742a8117 -r 33aed7dde69f app/controller/Zusatzwerte.js --- a/app/controller/Zusatzwerte.js Tue Jun 25 11:49:33 2013 +0200 +++ b/app/controller/Zusatzwerte.js Tue Jun 25 14:21:40 2013 +0200 @@ -63,8 +63,17 @@ Ext.MessageBox.confirm('Löschen', 'Sind Sie sicher?', function(btn){ if(btn === 'yes'){ var store = grid.getStore(); - store.remove(selection); - store.sync(); + var sprobenZusatz = selection.get('sprobenZusatz'); + var pzsId = sprobenZusatz.pzsId; + var probeId = selection.get('probeId'); + var deleteUrl = selection.getProxy().url + "/" + pzsId + "/" + probeId; + Ext.Ajax.request({ + url: deleteUrl, + method: 'DELETE', + success: function(response, opts) { + store.reload(); + } + }); console.log('Deleting Kommentar'); } else { console.log('Cancel Deleting Kommentar');