Hi,
It's maybe a shot in the wild, but I think I remeber having a similar
problem.
I fixed it within plone.z3cform. (There is a bug with the group handling
in ExtensibleForm). Attached is a patch which fixed it for me. (If it is
really the same problem I had.... I am not sure).
Gerhard
On 29/01/10 2:22 AM, athomerson wrote:
I am using zope.schema 3.6.0 (I have it pinned in my buildout) and that is
the version that is being picked up. I also have zc.buildout pinned at
1.4.1 and I am using "http://good-py.appspot.com/release/dexterity/1.0a3".
Here is a copy of the call stack (just in case it is any help):
DebugHttpServer.py, line 111, in __init__
response=response)
Publish.py, line 401, in publish_module
environ, debug, request, response)
Publish.py, line 202, in publish_module_standard
response = publish(request, module_name, after_list, debug=debug)
Publish.py, line 119, in publish
request, bind=1)
mapply.py, line 88, in mapply
if debug is not None: return debug(object,args,context)
Publish.py, line 42, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
layout.py, line 56, in __call__
self.update()
layout.py, line 50, in update
self.form_instance.update()
edit.py, line 32, in update
super(DefaultEditForm, self).update()
extensible.py, line 59, in update
super(ExtensibleForm, self).update()
group.py, line 134, in update
group.update()
group.py, line 47, in update
self.updateWidgets()
group.py, line 43, in updateWidgets
self.widgets.update()
field.py, line 276, in update
widget.update()
multi.py, line 61, in update
super(MultiWidget, self).update()
widget.py, line 70, in update
super(HTMLFormElement, self).update()
widget.py, line 84, in update
widget_value = self.extract()
widget.py, line 402, in extract
widget = self.getWidget(idx)
widget.py, line 294, in getWidget
widget.update()
widget.py, line 70, in update
super(HTMLFormElement, self).update()
object.py, line 213, in update
super(ObjectWidget, self).update()
widget.py, line 88, in update
self.value = widget_value
object.py, line 259, in set
value.get(name, interfaces.NO_VALUE))
object.py, line 229, in applyValue
interfaces.IValidator).validate(value)
validator.py, line 67, in validate
return field.validate(value)
_bootstrapfields.py, line 140, in validate
self._validate(value)
_field.py, line 327, in _validate
if value not in vocabulary:
BTW I think Dexterity is a great product and probably the future direction
for Plone. :)
Allen
Index: plone/z3cform/fieldsets/utils.py
===================================================================
--- plone/z3cform/fieldsets/utils.py (revision 108112)
+++ plone/z3cform/fieldsets/utils.py (working copy)
@@ -22,7 +22,7 @@
if source is None and group:
source = GroupFactory(group, new_fields)
- form.groups.append(source)
+ form.groups += (source, )
else:
if index is None or index >= len(source.fields):
source.fields += new_fields
@@ -114,4 +114,4 @@
return group_factory[0]
else:
return None
- return form
\ No newline at end of file
+ return form
Index: plone/z3cform/fieldsets/extensible.py
===================================================================
--- plone/z3cform/fieldsets/extensible.py (revision 108112)
+++ plone/z3cform/fieldsets/extensible.py (working copy)
@@ -51,7 +51,7 @@
class ExtensibleForm(GroupForm):
implements(IExtensibleForm)
- groups = []
+ groups = ()
default_fieldset_label = _(u"Default")
def update(self):
@@ -61,4 +61,4 @@
def updateFields(self):
extenders = getAdapters((self.context, self.request, self),
IFormExtender)
for name, extender in sorted(extenders, key=order_key):
- extender.update()
\ No newline at end of file
+ extender.update()
Index: plone/z3cform/fieldsets/README.txt
===================================================================
--- plone/z3cform/fieldsets/README.txt (revision 108112)
+++ plone/z3cform/fieldsets/README.txt (working copy)
@@ -131,6 +131,13 @@
>>> form.groups # doctest: +ELLIPSIS
(<plone.z3cform.fieldsets.group.Group object at ...>,)
+Let's recreate the form and see if it still works:
+
+ >>> form = TestForm(context, request)
+ >>> form.update()
+ >>> form.groups # doctest: +ELLIPSIS
+ (<plone.z3cform.fieldsets.group.Group object at ...>,)
+
Note that the created group is of a subtype of the standard z3c.form group,
which has got support for a separate label and description as well as a
canonical name.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers