[Product-Developers] dexterity and composition in models

Wichert Akkerman wichert at wiggy.net
Thu Apr 15 07:04:41 UTC 2010

On 4/15/10 05:01 , matth wrote:
> Hi,
> I keep running into a problem with composition in content types, and
> now that I am using Dexterity it is highlighted even more.
> There is a general notion that composition in zope is implemented
> through containment, although in Archetypes we do have the
> DataGridField and CompoundField which allow for composition type
> implementations not requiring containment.
> Zope interface schemas allow us to represent composition using Object
> fields, but currently these are not handled well in add/edit forms.

I would even go so far as to say that they are handled extremely badly 
in z3c.form. I did some work recently to improve that situation a bit 
for a project I'm working on and I think the result, while still far 
from polished, is quite workable: it supports adding extra items without 
a page reload but using a simple ajax call, removal of items without 
page reloads and looks a lot better as well. You might be able to 
extract something that works for you from my codebase at 
. The most important bits there are widget.NewMultiWidgetEntry , 
templates/multi_input.pt and templates/object_input.pt .


More information about the Product-Developers mailing list