Intercepting the save events

Topics: Developer Forum, Project Management Forum
May 2, 2008 at 12:17 PM
I've made some changes on 1.1.4 version to implement lastchange modify date on web page, but I'm not able to figure out the right event to use to put my code call. Actually I change the date every time user just enter in a doc, but this is not the right way to manage the last change date.
Any idea?

May 8, 2008 at 8:19 PM
Hi Andrea
I surpose you will have the last date when the content was changed.
Add the lastchangeddate in the save method for eg HtmlContent section.
To avoid users to update the lastdate without a change, compare the html before and after save.
May 9, 2008 at 11:13 AM
Hi rickard

Is there some internal method (provided by the kit) or should I use some implements of ICompare class ?
BTW, I will look through along the next week.

May 9, 2008 at 6:03 PM
Depending on wish section you will do this in you add the compare method in that section before saving it.
Basically you can save the string value on load in a session and then compare it to the one on save, or if you get the saved value before save.
May 10, 2008 at 7:43 AM
basically for what it concern, I don't want to compare anything. Just know when save has been pressed. So it could be a section added as well removed or a text modified. What I want is get out the date of the last change.
Browsing the code it seems there isn't an easy way to get it.

I should implement it for every single custom section or more generically on the base class of custom section. First time I went through this I didn't catch it immediately.

May be I will more lucky next time, but if you have a line code to suggest where to look into, it will be very appreciated.