OnRecordSave event, how to really use it right..

Find out how to get things done with Servoy. Post how YOU get things done with Servoy

OnRecordSave event, how to really use it right..

Postby jcompagner » Thu Aug 31, 2006 4:31 pm

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)
Johan Compagner
User avatar
Posts: 8142
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Postby amcgilly » Tue Nov 14, 2006 11:45 am

the docs make no mention of the onRecordSave event method receiving arguments - I think this should be explained in the docs.
Adrian McGilly
Servoy Developer

Posts: 374
Joined: Fri Dec 09, 2005 12:03 am
Location: San Francisco, CA

Return to How To

Who is online

Users browsing this forum: No registered users and 3 guests