[BlueBream] [Zope-dev] Reg. updating catalog indexes in bluebream
josh at hipro.co.in
Fri Jun 24 05:54:52 EDT 2011
On Fri, 2011-06-24 at 00:12 +0200, Thierry Florac wrote:
> You don't have to subscribe to IContainerModifiedEvent or
> IObjectModifiedEvent: zope.intid and zope.catalog packages already
> provide subscribers for these events to automatically handle updates
> of indexes.
> What you have to do is just to generate an ObjectAddedEvent or
> ObjectModifiedEvent when your object is added or modified, and notify
> subscribers for it:
When I add my object to its container via zope.formlib AddForm's
createAndAdd method like this
cl = Client()
self.context[cid] = cl
(P.S: I didn't explicitly notify the ObjectAddedEvent.)
In setitem function of zope.container.contained
'notify(ObjectAddedEvent)' happens, this causes the 'addIntIdSubscriber'
adapter of zope.intid to be called. This in turn registers the 'Client'
object and notifies for 'IntIdAddedEvent'.
But I don't see the 'indexDocSubscriber' of zope.catalog.catalog which
is the adapter for 'IIntIdAddedEvent' being called. Why is this so?
So, sm['intids'] is getting updated as and when new objects are added
but the catalog indexes are not getting updated. Am I missing something?
Or is there any specific zcml configuration needed for this?
Please guide me.
HiPro IT Solutions Private Limited
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 198 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/bluebream/attachments/20110624/1f438d57/attachment.bin
More information about the bluebream