Hi,
you should use RelatedItemsFieldWidget instead of RelatedItemsWidget
(the same naming convention applies for all z3c.form-widgets).
Regards,
Asko
Andreas Jung wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi there,
I am trying to get the RelatedItemsWidget of plone.app.widgets
flying with a Dexterity 2 content-type.
I tried something like
17 class IConversion(form.Schema):$
18 """ Project Folder """$
19 $
20 form.widget(template=RelatedItemsWidget)$
21 template = RelationChoice($
22 title=_(u"Template reference"),$
23
source=ObjPathSourceBinder(object_provides=IAuthoringTemplate.__identifier__),$
24 required=False,$
25 )$
but this gives me
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module ZPublisher.Publish, line 48, in call_object
Module plone.z3cform.layout, line 66, in __call__
Module plone.z3cform.layout, line 50, in update
Module plone.dexterity.browser.add, line 112, in update
Module plone.z3cform.fieldsets.extensible, line 59, in update
Module plone.z3cform.patch, line 30, in GroupForm_update
Module z3c.form.group, line 128, in update
Module z3c.form.form, line 134, in updateWidgets
Module z3c.form.field, line 254, in update
TypeError: __init__() takes exactly 2 arguments (3 given)
Is there some working example code how to use the RelatedItemsWidget?
Andreas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQGUBAEBAgAGBQJSXl01AAoJEADcfz7u4AZj3joLwKape1GAURXdEMo3vJ7D/3o7
St5JvBkBRMH9cIAiE2R/6AKZ+Y/YUZYtEJJxXCdNMbbySKOqAo5yJdH8PJEmw410
6SFZ4isgGbieal50Sm2fC4ulBzSajAnBU7igYYIpBeOyj0WUvlEWkceESB/F7Aku
kNYxMNjjPnHg8ZNCNRz2BpVr0fgWcbesY3oEVcDhESubEw/dORsUD9porYcAYXPp
zW2l+9+hRkJb+tXDbgWrGe7+blI2Zxql5GhZPvzd/lMdAe52A+l0NtiZX/tsTFIB
Ueiaomef18yhVqTX9kREjhB4lKZ2y7z7IE83rfraaT2sjtMcZryANgrN7i32LTko
TqQC5aT7iNO2B2WnGD5KjDIYIbwBtLZEqBAZzaMLNWEfDUfhIREAI3ca9Xihtdm3
vUj7kXLc8NhAYyNHRxMMiEGXwRYuk8fRb/w5Zyk/cncH/rUNTlbzDehl0TlI4VZ0
3wOpRqYGpj628ujgLADwlKC7+RvCWkg=
=20ji
-----END PGP SIGNATURE-----
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers
_______________________________________________
Product-Developers mailing list
[email protected]
https://lists.plone.org/mailman/listinfo/plone-product-developers