Record locking via check-out and check-in ?

A place for users and developers of the Xataface to discuss and receive support.

Postby knummela » Wed Jul 05, 2006 4:57 pm

We've run into some problems where two people have been making changes to the same record at the same time and changes were lost. This would be a problem in any situation but is more so for us because we are entering what can be many pages of information using the TinyMCE editor into what Dataface considers a single field in a record. Hence, this has already resulted in a fair amount of time being wasted when people have had to re-enter changes that were made.

Someone at our office suggested that the way to do this would likely be to create a check-out and check-in methodology in DataFace. Possibly, a number of other people using Dataface are ultimately using it in single-user mode but we've got a team of people working on our Dataface system which may be why it's more of an issue for us than other people.

Is this something you might be able to add and, if so, in the reasonably near future? If not, we could potentially take a stab at adding it ourselves (as part of the standard project).
knummela
 
Posts: 7
Joined: Wed Dec 31, 1969 5:00 pm

Postby shannah » Wed Jul 05, 2006 5:46 pm

Hi Keith,

Check-in check-out type functionality won't be difficult to do using Dataface 0.6 (i know, i know, it's not released yet :) ). Essentially all you would have to do is create a table called 'Locks' with columns:
- Tablename : the name of the table where the locked record resides
- RecordID : the record id of the locked record
- Username : The username of the user who locked the record.
- LockedTime: The time that the record was locked

Then we would create an action for the "actions" menu to "Lock" or "Unlock" record.
Finally, we implement getPermissions() in the delegate class to return READ ONLY permissions if the record is locked. This could also be achieved in Dataface 0.5.3 except that it would be harder to add the actions to the "actions" menu -- best to wait for 0.6.

It would take only an hour or two to add this functionality.

Perhaps, in the future, this could be added to the dataface core, but won't be for the 0.6 release.

Hope this helps.

Best regards

Steve
--
Steve Hannah
@shannah78 (on twitter)
sjhannah.com blog
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 11 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved