RE: [Zope] Searching for and displaying properties
manage_addProperty does not trigger recataloguing of the object even if its a subclass of CatalogAwareness. You should ? > either call obj.reindex_object() or at least obj.index_object(), if your class has the CatalogAwareness-Mixin or you use the catalog > API:
yourcatalog.catalog_object(obj,obj.absolute_url_path())
After that, your metadata should show up nicely w/o indexing the whole object tree.
Thanks Tino. I'd like to try your suggestion, but I don't know how to refer to the object that needs recataloguing. Can you help ? Again, here's my code that calls manage_addProperty. <code> wf = context.GeneralWorkflow instance_id = wf.addInstance( process_id=process, customer=jobname, comments=comment, title=subject, activation=1) wf.getInstance(instance_id).manage_addProperty('jobname', 'ABC12345', 'string') </code> - Danny
manage_addProperty does not trigger recataloguing of the object even if its a subclass of CatalogAwareness. You should ? > either call obj.reindex_object() or at least obj.index_object(), if your class has the CatalogAwareness-Mixin or you use the catalog > API:
yourcatalog.catalog_object(obj,obj.absolute_url_path())
After that, your metadata should show up nicely w/o indexing the whole object tree.
Thanks Tino.
I'd like to try your suggestion, but I don't know how to refer to the object that needs recataloguing. Can you help ? Again, here's my code that calls manage_addProperty.
<code>
wf = context.GeneralWorkflow instance_id = wf.addInstance( process_id=process, customer=jobname, comments=comment, title=subject, activation=1) wf.getInstance(instance_id).manage_addProperty('jobname', 'ABC12345', 'string')
</code>
Have you tried: wf = context.GeneralWorkflow instance_id = wf.addInstance( process_id=process, customer=jobname, instance_id.reindex_object() Jonathan
participants (2)
-
Jonathan -
Sinang, Danny