Page 1 of 1

OnRecordSave event, how to really use it right..

PostPosted: Thu Aug 31, 2006 4:31 pm
by jcompagner
Because there where a few issue reports about onRecordSave (called to much and it still did save a record even if return false was done)

For the next release (3.0RC4) i did fix somethings, for example it won't be called as often anymore for the same record and the previous/next record keystores will not work if the records fails to save itself.

But the main problem that i encountered is because in onRecordSave method the current selected record is tested by the developer, because it is assumed that that record is being saved. This is not the case! It can be any record in the foundset that can be saved that is altered by ui or scripting.. The record that you need to test is the record that is given as the first argument.. of the onRecordSave method.

we hope to really seperate this behaviour in the next servoy version (3.1) so that we get a real onRecordExit (ui level stop editting) and a table event: onRecordSave (that has nothing to do with the ui)

PostPosted: Tue Nov 14, 2006 11:45 am
by amcgilly
the docs make no mention of the onRecordSave event method receiving arguments - I think this should be explained in the docs.