Hi Thierry

> Betreff: {Spam?} Re: [Zope3-Users] Problem with z3c.form / 
> z3c.formui packages
> On mer, 2008-03-19 at 06:33 -0700, garz wrote: 
>       have some views for some content:
>       class 
> SomeContentDisplayForm(z3c.formui.layout.FormLayoutSupport,
>       z3c.form.form.DisplayForm):
>             fields = z3c.form.field.Fields(ISomeConcent)
>       class SomeContentEditForm(z3c.formui.layout.FormLayoutSupport,
>       z3c.form.form.EditForm):
>             fields = z3c.form.field.Fields(ISomeConcent)
>       if i try to use the view, a componentlookuperror is raised:
>       IFieldWidgets cant be looked up
>       i thought, the errors source was the BrowserRequest, 
> which should be marked
>       with the skin-type. if it was it should look up the 
> adapter from the right
>       layer. so i think something is wrong with my skin registration.

Does your skin or at least one super class use IFormLayoutSupport?

>       could please somebody help me. i'm stuck with the problem. :(

Can you tell that kind of fields the schema defines?
Probably there is not widget for one of this fields configured.

Or you can check which fields makes prtobelms with using the select

fields = z3c.form.field.Fields(ISomeConcent).select('oneWidget')

Try to find the field which makes problems. And then you can
take a look if z3c.form provides a IWidget configured for that

A good thing is alos debug and find out if your request really
provides the FormLayoutSupport. You can do this in the __init__
of your z3c.form class e.g.:

def __init__(self, context, request):
    import pdb;pdb.set_trace()
    super(MyForm, self).__init__(context, request)

Also make sure that the configure.zcml of z3c.formui
is included in your project. And you need to define the
skin with soemthing like:


> I think I had the same problem while using z3c.form 
> "DisplayForm" subclass.
> Problem disappeared by using an "EditForm" subclass and 
> setting form's mode to "DISPLAY_MODE"...

Seems defently a missing widget if other widget adapter will
be found for the same form.

Hope that helps

Roger Ineichen

> Thierry 
> --
> This message has been scanned for viruses and dangerous 
> content by MailScanner <http://www.mailscanner.info/> , and 
> is believed to be clean. 

Zope3-users mailing list

Reply via email to