简体   繁体   English

如何在ExtJS代理中正确处理成功响应?

[英]How do I properly handle a success response in an ExtJS proxy?

I have created a custom proxy with a custom reader and writer to interact with JSON documents in RavenDB. 我创建了一个具有自定义读取器和写入器的自定义代理,以与RavenDB中的JSON文档进行交互。 Loading and saving is all working well, except that the response for each update is not being handled properly. 加载和保存工作正常,除了未正确处理每个更新的响应。 I can still see the red triangle (dirty?) in the corner of some grid rows after they have been successfully saved to the data base. 成功将它们保存到数据库后,在某些网格行的角上仍然可以看到红色三角形(脏的?)。

The response looks like this: 响应如下所示:

{Patched: true;}

I am familiar with the successProperty, but I am not sure if that relates here or how/where to set it. 我对successProperty很熟悉,但是我不确定这与这里是否相关,以及如何/在何处进行设置。 In the proxy? 在代理? In the Model? 在模型中?

I suppose a less elegant solution would be to hook some event and call commit() on the record. 我想一个不太优雅的解决方案是挂接一些事件并在记录上调用commit()

it's in the proxy 它在代理中

proxy: {
    reader: {
        successProperty: 'Patched'
    }
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM