[Helma-user] Keeping track of changes of HopObject in onPersist()

Julian Tree julian.tree at gmail.com
Mon Jun 16 22:18:49 CEST 2008


I find onPerisist trigger very useful.

Is there a way to find out if a key/field has being changed in the  
HopObject?  Like new value of the field vs old(stored) valued of the  
field, like in a stored procedure in at SQL database.

For example something like below would be userful:

this.firstName = req.postParams.firstName;


this.onPersist = function(){
	if(this.firstName.getOldValue() == this.firstName){
		//user has changed the value of the firstName
		// do something big
	}

}


Julian



More information about the Helma-user mailing list