[Zope] CatalogAwareBase doesn't auto-reindex?
Chris McDonough
chrism@zope.com
Sat, 29 Sep 2001 18:14:14 -0400
Hi Bryan,
Please keep the mail on the maillist, thanks.
This is a limitation when using prebuilt forms from the properties
interface. The prebuilt propertysheet editing forms don't call
reindex_object.
You need to create a custom properties-editing form with a target that
calls reindex_object as well as modifying the properties.
You could make the target a Python Script or a DTML method, as long as
it calls the right stuff (manage_changeProperties and reindex_object) on
itself with the right values.
HTH!
- C
Bryan Field-Elliot wrote:
> Thanks,
>
> Where do I place this call? There are no methods to modify, except the
> constructor. The constructor isn't the appropriate place, I think.
>
> Thanks,
>
> Bryan
>
> On Sat, 2001-09-29 at 16:04, Chris McDonough wrote:
>
> /I think you need to call "reindex_object" on your catalogaware object /
> /manually... it indexes itself automatically but doesnt reindex itself /
> /automatically./
> //
> /See http://www.zope.org/Members/AlexR/CatalogAware for more info.../
> //
> /Bryan Field-Elliot wrote:/
> /> Hi,/
> /> /
> /> I'm new to Zope -- let me first say, I'm totally blown away! I come from /
> /> a Java/JSP/Servlet world, and Zope is just blowing my mind!/
> /> /
> /> I am using the latest Zope release (downloaded and installed yesterday)./
> /> /
> /> I am trying to use ZCatalog, and CatalogAwareBase as a base class for my /
> /> custom ZObject./
> /> /
> /> I have successfully managed to get things straight so that my catalog /
> /> notices whenever I create new instances of my custom classess (I had to /
> /> call my catalog "Catalog"). The new instances correctly show up in the /
> /> "Catalog" tab of my Catalog./
> /> /
> /> However, I am having a terrible time trying to get the Catalog to /
> /> automatically re-index objects when I modify them. I am using standard /
> /> property sheet editor page generated in the Product config area for my /
> /> object class. Is this the wrong thing to do?/
> /> /
> /> It's hard to imagine the usefulness of the ZCatalog without it being /
> /> up-to-date when objects change. I guess I'm just used to the RDBMS world /
> /> where this is completely expected behavior./
> /> /
> /> I can't tell if this is a bug in CatalogAwareBase, or else if the /
> /> documentation is lacking./
> /> /
> /> Thanks,/
> /> /
> /> Bryan/
> /> /
> /> /
> //
> //
> /-- /
> /Chris McDonough Zope Corporation/
> /http://www.zope.org http://www.zope.com/
> /"Killing hundreds of birds with thousands of stones"/
> //
>
--
Chris McDonough Zope Corporation
http://www.zope.org http://www.zope.com
"Killing hundreds of birds with thousands of stones"