[Zope-dev] z3c.form: GroupForm and ModificationEvents

Roger dev at projekt01.ch
Tue Jan 12 16:22:06 EST 2010


Hi Michael 

> Betreff: [Zope-dev] z3c.form: GroupForm and ModificationEvents
> 
> Hi,
> 
> it seems to me that z3c.form.group.GroupForm does not send 
> enough ModificationEvents: only one event for the context of 
> the GroupForm but not for each modified object in the groups.
> 
> In a project of mine I have the following situation: I have a 
> folder with some contained objects. A GroupForm displays the 
> schema fields of the folder and the ones of all contained objects.
> When I modify one of the fields of a contained object I would 
> expect a ModifiedEvent for this object. (Is this a valid 
> expectation?) But GroupForm sends only one ModifiedEvent for 
> the Folder (context of the form). This is even wrong in my 
> case. At least the ModifiedEvent-Subscriber in 
> zope.dublincore can't handle this and wrongly marks only the 
> folder as modified.
> 
> Do I have a very special use case which should be handled 
> inside my project?
> Or should I change GroupForm to send a ModifiedEvent for each 
> modified object?

I'm not using group forms so I can't say if it's wrong or right.
But I have a question. Does the ISublocation adapter not
dispatch the modified event to the containers items?

Are you sure that you use the ISublocation adapter which
will dispatch events to container items?

If this will not help, I think it's not bad to 
implement such an event notification. Probably
in a method or with a marker which allows others
to simply disable the additional event notification.

Regards
Roger Ineichen

> Yours sincerely,
> --
> Michael Howitz · mh at gocept.com · software developer gocept 
> gmbh & co. kg · forsterstraße 29 · 06112 halle (saale) · 
> germany http://gocept.com · tel +49 345 1229889 8 · fax +49 
> 345 1229889 1 Zope and Plone consulting and development
> 
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> https://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  ** (Related lists -  
> https://mail.zope.org/mailman/listinfo/zope-announce
>  https://mail.zope.org/mailman/listinfo/zope )
> 



More information about the Zope-Dev mailing list