PDA

View Full Version : CommitDone Event should be add the object "o"



sipo
Apr 08, 2009, 2:31 PM
<DIV class=sourceRow executable="true"><A class=sourceLine>369</A> this.commitChanges();
<DIV class=sourceRow><A class=sourceLine>370</A> }
<DIV class=sourceRow><A class=sourceLine>371</A>
<DIV class=sourceRow><A class=sourceLine>372</A>
<DIV class=sourceRow executable="true"><A class=sourceLine>373</A> this.fireEvent("commitdone", this, options);
<DIV class=sourceRow><A class=sourceLine>374</A>
<DIV class=sourceRow executable="true"><A class=sourceLine>375</A> var dataAbsent = true;
<DIV class=sourceRow executable="true"><A class=sourceLine>376</A> if (serviceResult.data &amp;&amp; serviceResult.data != null &amp;&amp; this.proxy.refreshData) {
<DIV class=sourceRow executable="true"><A class=sourceLine>377</A> dataAbsent = false;
<DIV class=sourceRow executable="true"><A class=sourceLine>378</A> this.proxy.refreshData(serviceResult.data);
<DIV class=sourceRow><A class=sourceLine>379</A> }
<DIV class=sourceRow><A class=sourceLine>380</A>
<DIV class=sourceRow executable="true"><A class=sourceLine>381</A> this.refreshIds(newRecordsExists, deletedExists, dataAbsent);
<DIV class=sourceRow><A class=sourceLine>382</A> }


here 373 should be


this.fireEvent("commitdone", this, options,o);





<DIV class=sourceRow>recordsSaved: function(o, options, success) {
<DIV class=sourceRow executable="true"><A class=sourceLine>288</A> if (!o || success === false) {
<DIV class=sourceRow executable="true"><A class=sourceLine>289</A> if (success !== false) {
<DIV class=sourceRow executable="true"><A class=sourceLine>290</A> this.fireEvent("save", this, options);
<DIV class=sourceRow><A class=sourceLine>291</A> }
<DIV class=sourceRow executable="true"><A class=sourceLine>292</A> if (options.callback) {
<DIV class=sourceRow executable="true"><A class=sourceLine>293</A> options.callback.call(options.scope || this, options, false);
<DIV class=sourceRow><A class=sourceLine>294</A> }
<DIV class=sourceRow><A class=sourceLine>295</A> //this.fireEvent("commitfailed", this);
<DIV class=sourceRow executable="true"><A class=sourceLine>296</A> return;
<DIV class=sourceRow><A class=sourceLine>297</A> }
<DIV class=sourceRow><A class=sourceLine>298</A>
<DIV class=sourceRow executable="true"><A class=sourceLine>299</A> var serverSuccess = o.success;
<DIV class=sourceRow executable="true"><A class=sourceLine>300</A> var msg = o.msg;


the "o" has "Msg" and "Data" Member
It will pass some msg when saved.
I want to display the msg.

vincent_van
May 30, 2011, 3:55 PM
Hi,

I have same requirement, may I know it's solved in latest version or not? or we have some work-around for this?
Thanks