• Post Reply Bookmark Topic Watch Topic
  • New Topic

getting only modified data for logging from component list

 
vijendra singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
My objective is to log only those contents which are really modified through update button, by comparing the previous existing contents from content list. If a person just go to edit page and without modifying anything he saves the page and comes out log should not do anything here. but whatever he modifies like name, content, description it sholud get compared with previously found data and modified content sholud get reported and logged to file system.
People says using thread in backgroud to compare objects can do this but will cost the speed of application and if you kill the deployed applcation at any stage process gets killed and logging will not take into effect.

Anyone have any better suggestion or any proper idea which is been implemented somewhere.

thanks
vijendra
[ August 03, 2007: Message edited by: Bear Bibeault ]
 
Remko Strating
Ranch Hand
Posts: 893
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the setters of you're javabean for checking if the value of the form is different than the current values of the bean. If this is so then you can save the changed value.

I do this in almost all my beans, because I only want to save something to the database if something is changed. This saves database capacity.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!