zafiro
24 Aug 2007, 7:16 AM
Hi:
I want to submit records to be deleted from my database; however, I don't want to reload all records that weren't modified.
I tried by using jsonStore.load({add:true, ....}) and retrieving an empty list for the records to add:
{"success":true, "records":[]}
However it breaks!
Here is the stack trace from Firebug:
r has no properties
(no name)([Object name=nombre id=0 locked=false], [undefined, Object id=1012 data=Object json=Object store=Object], Object data=[6] baseParams=Object paramNames=Object, 6, 1, true)ext-all-debug.js (line 27806)
renderRows(6, 5)ext-all-debug.js (line 27788)
insertRows(Object data=[6] baseParams=Object paramNames=Object, 6, 5, undefined)ext-all-debug.js (line 27635)
onAdd(Object data=[6] baseParams=Object paramNames=Object, [], 6)ext-all-debug.js (line 27226)
fire()ext-all-debug.js (line 1363)
fireEvent()ext-all-debug.js (line 1173)
add([])ext-all-debug.js (line 10355)
loadRecords(Object success=true records=[0] totalRecords=0, Object params=Object add=true, true)ext-all-debug.js (line 10467)
loadResponse(Object params=Object request=Object reader=Object, true, Object tId=7 status=200 statusText=OK)ext-all-debug.js (line 10894)
apply(function(), Object events=Object conn=Object useAjax=true, [Object params=Object request=Object reader=Object, true, Object tId=7 status=200 statusText=OK], undefined)ext-base.js (line 10)
handleResponse(Object tId=7 status=200 statusText=OK)ext-all-debug.js (line 5035)
getViewWidth(Object conn=XMLHttpRequest tId=7, Object scope=Object argument=Object timeout=30000, undefined)ext-base.js (line 12)
getViewWidth()
First question: Is there another way to get this behaviour?
Second: Anyway, this method shouldn't break with an empty list, right?
------------
Jaja, in the meanwhile I am returning a dummy record (id=-2) and erase it as soon as the success callback is executed, along with the other records I had to erase :))
I want to submit records to be deleted from my database; however, I don't want to reload all records that weren't modified.
I tried by using jsonStore.load({add:true, ....}) and retrieving an empty list for the records to add:
{"success":true, "records":[]}
However it breaks!
Here is the stack trace from Firebug:
r has no properties
(no name)([Object name=nombre id=0 locked=false], [undefined, Object id=1012 data=Object json=Object store=Object], Object data=[6] baseParams=Object paramNames=Object, 6, 1, true)ext-all-debug.js (line 27806)
renderRows(6, 5)ext-all-debug.js (line 27788)
insertRows(Object data=[6] baseParams=Object paramNames=Object, 6, 5, undefined)ext-all-debug.js (line 27635)
onAdd(Object data=[6] baseParams=Object paramNames=Object, [], 6)ext-all-debug.js (line 27226)
fire()ext-all-debug.js (line 1363)
fireEvent()ext-all-debug.js (line 1173)
add([])ext-all-debug.js (line 10355)
loadRecords(Object success=true records=[0] totalRecords=0, Object params=Object add=true, true)ext-all-debug.js (line 10467)
loadResponse(Object params=Object request=Object reader=Object, true, Object tId=7 status=200 statusText=OK)ext-all-debug.js (line 10894)
apply(function(), Object events=Object conn=Object useAjax=true, [Object params=Object request=Object reader=Object, true, Object tId=7 status=200 statusText=OK], undefined)ext-base.js (line 10)
handleResponse(Object tId=7 status=200 statusText=OK)ext-all-debug.js (line 5035)
getViewWidth(Object conn=XMLHttpRequest tId=7, Object scope=Object argument=Object timeout=30000, undefined)ext-base.js (line 12)
getViewWidth()
First question: Is there another way to get this behaviour?
Second: Anyway, this method shouldn't break with an empty list, right?
------------
Jaja, in the meanwhile I am returning a dummy record (id=-2) and erase it as soon as the success callback is executed, along with the other records I had to erase :))