简体   繁体   English

extjs4如何重置我的修改存储

[英]extjs4 how to reset my modified store

I would like to save my modified record in extjs4, and when I change some checkbox and go to the next page I haven't last modified record why? 我想将修改后的记录保存在extjs4中,当我更改一些复选框并转到下一页时,为什么我最后没有修改过的记录? in extjs 3 I found this method pruneMOdifiedRecords (if true - save modification), but in extjs4 i haven't found this method How can I do this? 在extjs 3中,我发现了此方法pruneMOdifiedRecords(如果为true-保存修改),但是在extjs4中,我没有找到此方法,我该怎么做?

如果要保存更改,则可以要求商店使用.sync()与服务器同步或放弃它们,然后使用.reload()重新加载

您可以调用commitChanges来保存您的修改,而调用rejectChanges来重置它们。

To 'reject' all your changes in record you can use(ExtJS 3.x): 要“拒绝”记录中的所有更改,可以使用(ExtJS 3.x):

record.reject();

Here your all changes will be rejected which you made from creation of record or last commit of record. 在这里,您从创建记录或最后一次提交记录所做的所有更改都将被拒绝。

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

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