Store的提交和回滚类似于数据库中的commit、rollback,当客户端修改了一条Record的属性之后,这条Record记录和后台数据库中的实际数据就不一致了,此时的Record对象就成了"脏数据"
commitChanges():void
- None.
- void
rejectChanges():void
上面是将Store中的所有记录都进行提交或回滚,而有时我们只需要回滚或提交某条记录,就会使用到Ext.data.Record的
commit([Booleansilent]):void
Developers should subscribe to theExt.data.Store.updateevent to have their code notified of commit operations.
-
silent: Boolean(optional) True to skip notification of the owning store of the change (defaults to false)
- void
reject([Booleansilent]):void
Developers should subscribe to theExt.data.Store.updateevent to have their code notified of reject operations.
-
silent: Boolean(optional) True to skip notification of the owning store of the change (defaults to false)
- void
本文详细解释了如何使用Ext.data.Record类的commit和reject方法来处理客户端与后台数据库之间的同步问题,包括如何提交或回滚记录的更改。

2941

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



