Am Samstag, 7. April 2007 18:06 schrieb Christophe Combelles:
> Hello,
> I have a regular content object which uses the formlib for its edit view.
> Nothing special, just like a Recipe.
> But I want this object to only reside in the Site Manager, because it will
> be used as a configurable local utility (some kind of LocalKitchenTools
> utility)
> Everything is perfect, and the EditForm works well until I want to tell
> this object to be only contained in the SiteManager. So I just add this
> statement in the interface:
> containers(ILocalSiteManager)
> or
> containers(ISiteManagementFolder)
> When I do any of these, the EditForm fails with a ComponentLookupError
> What Am I missing? Why does a simple constraint create an error on this?

I *think* I've got the same problem - the thing is that interfaces inheriting 
from container interfaces inherit the __name__ and __parent__ attributes. And 
the formlib classes try to set up widgets for these attributes, which results 
in a component lookup error.

I simply omitted these two attributes, which solved the problem.


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