Undo data for particular attribute

Hi all,  On click the cancel button I needed to show the previously enter data for the particular attribute which is not stored in the database, - - Instead the cancel is removes/clears the all attribute values of the object which is not committed. (I have attributes values which are populated dynamically and not store in the DB and used by other objects in the same time)   Any idea on how to do it Thanks
1 answers

You can  retrieve the original object from database with



and set the values back or copy the values from the changed object into the databaseobject and commit that one.