Re: Keeping track of changes of HopObjectin onPersist()

View: New views
1 Messages — Rating Filter:   Alert me  

Re: Keeping track of changes of HopObjectin onPersist()

by Maksim Lin for technical support mailling lists :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>
> 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.
_______________________________________________
Helma-user mailing list
Helma-user@...
http://helma.org/mailman/listinfo/helma-user
LightInTheBox - Buy quality products at wholesale price