FW: [Zope3-Users] formlib problem

Stéphane Brault stephane_brault at yahoo.fr
Tue Apr 18 10:02:02 EDT 2006


Thanks Pete,
 I registered the adapters in the shell and it works.
 The trouble is that I have the same problem from zope. 
 It seems that the adapters for the shema fields are not registered, 
 therefore I can't have formlib working, even when I register the adapters 
 by code. I don't know what  to do. The fact is I use AJAX, 
 so I don't have to register my pages, since they are never called, but
 used to generate the html I use to update my pages (which works fine otherwise). 
 Maybe this explains the behaviour I get, but I doubt it.
 
 Stéphane

----- Message d'origine ----
De : Pete Taylor <baldtrol at gmail.com>
À : stephane_brault at yahoo.fr
Envoyé le : Mardi, 18 Avril 2006, 2h13mn 10s
Objet : Re: FW: [Zope3-Users] formlib problem

formlib works just fine, but from the shell i haven't had much luck
either.  probably need to look at the test suite that runs with
form.txt and do the necessary setup for it to work correctly.  i found
it easier just to build a few sample forms and zcml, and learn "by
doing" since getting the shell to work right was kinda a pain ;)

> -----Original Message-----
> From: zope3-users-bounces at zope.org [mailto:zope3-users-bounces at zope.org] On
> Behalf Of Stéphane Brault
> Sent: Tuesday, April 18, 2006 7:42 AM
> To: user-list zope
> Subject: [Zope3-Users] formlib problem
>
> Hi,
>  I can't use formlib, when I run the example in the form.txt I get this
> error:
>  Traceback (most recent call last):
>    File "<pyshell#29>", line 1, in -toplevel-
>      print MyForm(None, request)()
>    File "<pyshell#26>", line 6, in __call__
>      widgets = form.setUpWidgets(self.form_fields, 'form', self.context,
> self.request, ignore_request= ignore_request)
>    File "C:\Python24\Lib\site-packages\zope\formlib\form.py", line 255, in
> setUpWidgets
>      IInputWidget)
>    File "C:\Python24\Lib\site-packages\zope\component\__init__.py", line
> 154, in getMultiAdapter
>      raise ComponentLookupError(objects, interface, name)
>  ComponentLookupError: ((, http://127.0.0.1>), , u'')
>
>  It happens when setUpWidgets is called in the first example, do I need to
> import something or to configure a component for formlib to work ?
>  Any hint ?
>
>  Thanks,
>
>  Stéphane
>
>
> _______________________________________________
> Zope3-users mailing list
> Zope3-users at zope.org
> http://mail.zope.org/mailman/listinfo/zope3-users


--
"All guilt is relative, loyalty counts, and never let your conscience
be your guide."
  - Lucas Buck, American Gothic





More information about the Zope3-users mailing list