<html>
<head>
</head>
<body style="margin: 0pt; padding: 0pt;">
Ok, still no joy. The form is rendered fine but the "Fields: <span class="error">Object is of wrong type." keeps coming.</span> Here's the code:<br /><br />class IFooField(interface.Interface):<br /> name = schema.TextLine(title=u'Name', required = True)<br /> label = schema.TextLine(title=u'Label', required = True)<br /> format = schema.Choice(title=u'Field Format', required = True, values = ['Text', 'Date', 'Number'])<br /><br />class FooField(grok.Model):<br /> grok.implements(IFooField)<br /> name = FieldProperty(IFooField['name'])<br /> label = FieldProperty(IFooField['label'])<br /> format = FieldProperty(IFooField['format'])<br /> <br />class IFoo(interface.Interface):<br /> title=schema.TextLine(title=u'Title',required=True)<br /> description=schema.TextLine(title=u'Description',required=False)<br /> data_fields_ext = schema.List(title=u'Fields', required = False, unique = True, <br /> value_type = schema.Object(title=u'Field', required = False, schema = IFooField))<br /> <br />class Foo(grok.Application, grok.Container):<br /> grok.implements(IFoo)<br /> title = u'Foobar'<br /> description = u''<br /> <br />class FooEditForm(grok.EditForm):<br /> grok.context(Foo)<br /> grok.name('admin')<br /> <br /> form_fields = grok.AutoFields(Foo) <br /> object_widget = CustomWidgetFactory(ObjectWidget, FooField)<br /> form_fields['data_fields_ext'].custom_widget = CustomWidgetFactory(SequenceWidget, subwidget=object_widget)<br /> template = grok.PageTemplateFile('custom_edit_form.pt')
<div class="signature"><br /><br /><br />-- <br />Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief! <br />Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail</div></body>
</html>