-
28 Nov 2008 12:30 AM #1
[2.??] Record.commit()
[2.??] Record.commit()
Record.commit() does not take into account if Record has already been commited,so you can get "double" commit,that not desirable in some circumstences.That looks really odd if you remember how careful "change" event handled for TextField and alike(value checked if it's really modified before firing "change").
Thanks.
-
28 Nov 2008 12:45 AM #2
a commit is a commit. what do you mean by "double commits"?
(i'm thinking along the lines of database commits here.)
could you post some demo code to better explain your situation?
Sencha Docs / Ext 3.x - ( Docs | Examples )
Learning Center / Saki's Examples (for 2.x) / HOWTO - ( Report Bugs | Post Proper Code )
-
30 Nov 2008 10:40 PM #3
exactly-I could not make commit second time.a commit is a commit
Code of commit method for Record:
all this code execute EVERYTIME I call commit(),particularlyCode:this.dirty = false; delete this.modified; this.editing = false; if(this.store && silent !== true){ this.store.afterCommit(this); }
that makes false assertion,if commit was done earlier.Code:this.store.afterCommit(this);
Thanks.
-
30 Nov 2008 10:47 PM #4
This isn't a bug, if you're explicitly calling commit on the record then that's what it will do.
If your issue is the afterCommit being called, you can always have it commit silently.Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!


Reply With Quote