[Grok-dev] schema.Object

Souheil CHELFOUH trollfot at gmail.com
Wed Jul 21 05:05:56 EDT 2010


The schema of the Object field is only used for validation.
The component look up error probably comes from something unrelated.
Can you provide the complete traceback ?

2010/7/21 Christian Klinger <cklinger at novareto.de>:
> Hi Sascha,
>
> can you provide a traceback. I guess you have to add an adapter which
> is responsible for creating a instance of IFooField, which is saved then
> in your IFoo.data_fields.
>
> Sorry, i am not sure about it. I think the traceback will help a lot...
>
> Christian
>
>>   Hello again!
>>
>> This time I am trying to use schema.Object and I am getting a
>> ComponentLookupError when accessing the generated form. Here are the
>> interface definitions:
>>
>> class IFooField(interface.Interface):
>> name = schema.TextLine(title=u'Field Name', required = True)
>> format = schema.Choice(title=u'Field Format', required = True, values =
>> ['Text', 'Date', 'Number'])
>>
>> class IFoo(interface.Interface):
>> title=schema.TextLine(title=u'Title',required=True)
>> description=schema.TextLine(title=u'Description',required=False)
>> data_fields = schema.Object(title=u'Fields', required = False, schema =
>> IFooField)
>>
>> Do I need to do anything special or should calling grok.AutoFields on
>> the form view suffice?
>>
>> Thanks,
>> Sascha
>>
>>
>>
>> --
>> GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
>> Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
>>
>>
>>
>> _______________________________________________
>> Grok-dev mailing list
>> Grok-dev at zope.org
>> https://mail.zope.org/mailman/listinfo/grok-dev
>
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> https://mail.zope.org/mailman/listinfo/grok-dev
>


More information about the Grok-dev mailing list