[Zope] reindex when a zclass is edited

Ivan Cornell ivan.cornell@framestore.co.uk
Wed, 10 Jan 2001 19:53:22 +0000


Tim Hicks wrote:

>  I can't for the
> life of me figure out or find anywhere that can tell me how to make the
> instance get reindexed when it is edited.  I'm assuming that it is similar
> to the process for reindexing when the properties are changed, but I'm just
> not sure of the details. If it's not too much trouble, could someone give me
> detailed instructions (or a link) on how to do this. I'd really appreciate
> it.
>

In your method which is called by your edit form, insert a <dtml-call
"this().reindex_object()"> after updating the properties.

Eg, in my manage_edit method I have

    <dtml-call "propertysheets.Base.manage_editProperties(REQUEST)">
    <dtml-call "propertysheets.Facility.manage_editProperties(REQUEST)">
    <dtml-call "this().reindex_object()">

Regards, Ivan