On Mon, Mar 14, 2011 at 11:29 AM, Sarpidon <[email protected]> wrote: > Thank you for your answers. > > What I did was to create a hidden input with the current timestamp > (when the edit page is generated) > > Upon save I check if the record has a greater timestamp than the one > from the hidden input and if so i redirect back with a flash message > saying "This post has already been updated by user XXX 3 minutes ago". > > I think this is a better approach as it does not lock the page rather > than check whether the record has been updated while you were editing > the page. The problem with this is that all the changes are lost. So I > am thinking of creating custom validation function that will handle > the data.
I think this would frustrate me to no end as an end user. I'd much rather find the file locked for editing than to discover that my changes have been discarded because someone else happened to hit save while I was still writing. -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
