aspose file tools*
The moose likes Beginning Java and the fly likes finding out if a property of an object is changed or not Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "finding out if a property of an object is changed or not" Watch "finding out if a property of an object is changed or not" New topic
Author

finding out if a property of an object is changed or not

Barney Mosby
Greenhorn

Joined: May 26, 2011
Posts: 1

I want to find out if any property on my object has changed or not so if the user has changed some stuff - for example a description field - then let's activate the save butto
so an idea could be this: let's create a Backup of the object at the beginning.... at the end when user is done we also have another object .... now let's compare these two objects and see if they are equal or not, if they are not then it means we need to make some updates ...

now is there any nice library or pattern or idea! that can do this?
Badal Chowdhary
Ranch Hand

Joined: Apr 26, 2011
Posts: 34

Hi,

I am assuming you have a web page where a user is going to populate description field. You could have an onchange javascript event that calls a javascript function. You could do processing in this method.

The end user should not have javascript disabled on his browser.

Thanks,
Badal


Blog: http://badalchowdhary.wordpress.com/
Twitter: http://twitter.com/badalrocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: finding out if a property of an object is changed or not