Jack,
Could you please suggest the best way to approach this problem.
We are processing updates from an editable grid in our application server. However some of the updates may fail validation in the app server. So the failed updates are sent back to the browser and re-applied to the grid. Hence the user can see the modifications that failed.
To achieve this we return the failed updates as well as the grid contents in the JSON. I subclassed the Ext.data.JsonReader and overrode readRecords to extract the failed updates from the response. My reader stashes the updates with the grid for processing by a data store load listener. This largely works but has a strange effect.
Following a response with some failed updates, subsequent requests are issued multiple times. The number of duplicate requests increases as more responses are received.
So my key question is how should I go about modifying the JSON handling.
Thanks for any and all suggestions,
Regards,
Gordon
Update: This behaviour is only provoked after the server responds with a HTTP 500 or other error. So I'm now considering how loadExceptions are handled.
Could you please suggest the best way to approach this problem.
We are processing updates from an editable grid in our application server. However some of the updates may fail validation in the app server. So the failed updates are sent back to the browser and re-applied to the grid. Hence the user can see the modifications that failed.
To achieve this we return the failed updates as well as the grid contents in the JSON. I subclassed the Ext.data.JsonReader and overrode readRecords to extract the failed updates from the response. My reader stashes the updates with the grid for processing by a data store load listener. This largely works but has a strange effect.
Following a response with some failed updates, subsequent requests are issued multiple times. The number of duplicate requests increases as more responses are received.
So my key question is how should I go about modifying the JSON handling.
Thanks for any and all suggestions,
Regards,
Gordon
Update: This behaviour is only provoked after the server responds with a HTTP 500 or other error. So I'm now considering how loadExceptions are handled.

|
#2
|
|
It's hard to say without seeing some code. To me, it sounds like you might be attaching or instantiating something within an event handler which would cause it to show up multiple times with the number of times increasing with the number of times that event handler is called.
![]() |
|
#3
|
|
I've fixed this bug. It was a problem in my code.
Basically multiple handlers were being added to a button. There was a boolean variable which was supposed to prevent this but it was sometimes null rather than true or false. Regards, Gordon ![]() |
作者在使用ExtJS处理应用服务器返回的可编辑网格更新时遇到问题,部分更新未能通过验证并被重新发送到浏览器。为了解决由此引发的多次重复请求问题,作者详细描述了问题现象并寻求解决方案。最终发现问题是由于按钮处理程序被多次添加所导致。
1757

被折叠的 条评论
为什么被折叠?



