<html>
<head />
<body>
Ok, here's the relevant 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 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, constraint = check_df,<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 /> data_fields_ext = None<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')<br /><br />The widgets render fine, but if I click the Apply button, I get the following:<br />
<div class="form-status">
<div><br />There were errors</div>
<ul class="errors">
<li> Fields: <span class="error">Object is of wrong type.</span></li>
</ul>
I am not sure how I can debug this. I would really appreciate any further advice.<br /><br />Regards,<br />Sascha </div>
<div class="signature"><br /><br /><br />-- <br />GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl. <br />Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl</div></body>
</html>