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

Maksim Lin for technical support mailling lists maksim_lin at ngv.vic.gov.au
Tue Jun 17 01:24:21 CEST 2008


> 
> On Mon, 2008-06-16 at 16:18 -0400, Julian Tree wrote:
> > Is there a way to find out if a key/field has being changed in the 
> > HopObject?
> 
> Not in Helma 1.x. I heard there were more events planned for 
> Helma NG, so maybe there's an onChange event planned for 
> HopObject properties, but I don't know.

In the case of helma-ng and using JSAdapter objects this would be
relatively straight forward, since every property change would be
"trapped" by the JSAdapter object's getter function, which could then
easily trigger a call back.  However this isn't implemented in the
current version of minibase in the helma-ng sandbox.

Of course this kind of call back should also be possible to add into
Helma 1.x as all HopObject property access would go through the Java
class helma.scripting.rhino.HopObject get() function for "simple js"
properties or jsFunction_get() in the case of HopObject reference
properties. But as you can see, this does involve changes to core Java
code. 

Maks.


More information about the Helma-user mailing list