As already mentioned before, I use interfaces that contain lists of other 
interfaces via the following syntax:

emails = List(value_type=Object(schema=IEmail))

In my formlib-based class, I have use the following, so that the widgets are 
displayed correctly:

email_widget = CustomWidgetFactory(ObjectWidget,Email)
emails_widget = CustomWidgetFactory(ListSequenceWidget, 

and in the form.Form based class:

form_fields['emails'].custom_widget = emails_widget

The widgets are displayed perfectly, but when I try to update the data, the 
validation fails with the following error:

"Wrong contained type"

I don't know how to get around this, especially I don't find a good entry 
point to this problem - it seems that this error comes from the 
widget.getInputValue() function - is that true?

All objects in my example are of the type Interface, perhaps I have to define 
them as containers? 

Another thing I don't know is how I can omit fields from the email_widget, is 
there a simple solution?

Best Regards,

GPG key ID: 299893C7 (on keyservers)
FP: 0124 2584 8809 EF2A DBF9  4902 64B4 D16B 2998 93C7
Zope3-users mailing list

Reply via email to