[Zope] Change properties -> auto-update

Dieter Maurer dieter at handshake.de
Sat Mar 19 14:00:48 EST 2005


Gre7g Luterman wrote at 2005-3-18 12:23 -0700:
>I've created a product with a zClass that has a couple of property 
>sheets.  Users can place this product in their web hierarchy and edit 
>properties with the Properties tab.  This all works just fine.
>
>The problem is that modifying one of the properties needs to have a 
>side effect.  I would like to update a database if this property is 
>changed.  Is there an easy way to hook into this process so I can set 
>up a side-effect script?

There is no built in hook for this.

The easiest (though not necessary the clearest) way would
be to use a monkey patch (see Zope.org) to change
the "PropertySheet"s "manage_changeProperties" and "manage_editProperties".

>The default propertysheets/Basic/manage page posts the results to 
>propertysheet/Basic, but I'm fuzzy on how (or if) you can change the 
>processing of this script.

Almost surely, it calls "propertysheet.Basic.manage_editProperties".
You can replace both the form and its action and in your
new action do whatever you need....


-- 
Dieter


More information about the Zope mailing list