devOp
devOp

Reputation: 3170

Remove Storeitem without sending a delete request to server in ExtJS4

I want to remove a Storeitem in ExtJS4.1 using store.remove(item), but i don't want to send a delete request to the server.

In the stores proxy api i have only the read-Url defined:

api: { read: '/daten/zhalter' }

Now when i remove the item a javascript error is thrown. I found out that it comes because i don't have destroy-url defined, when i define one everything is fine.

My Question is: How can i delete an item without sending a delete request?

Upvotes: 0

Views: 227

Answers (2)

user2206294
user2206294

Reputation: 1

You should add destroy property:

api: {destory: 'url/delete'}

Then use:

store.sync();

Upvotes: 0

devOp
devOp

Reputation: 3170

I've found an answer by myself. I turned autosync off for that command:

quellStore.autoSync = false;    
quellStore.remove(item);    
quellStore.autoSync = true;

Upvotes: 2

Related Questions