[Zope3-Users] formlib handling of adapters

Dominique Lederer dominique.lederer at inode.at
Sat May 5 08:07:58 EDT 2007


hi

i just tried to adapt an object with two similar interfaces:

class IBaseAdapter(Interface):
	content = Text(title=u"Content", required=False)

class IHomeAdapter(IBaseAdapter):
    """ """
class ILinksAdapter(IBaseAdapter):
    """ """

after that, i created two formlib editform views and registered them on my
adapted object. The "content" property is saved on different annotation keys on
the adapted object. The form renders correctly, but the "content" property is
only handled via the ILinksAdapter by formlib. so content is saved always on the
same annotation key.

if i change my interfaces to
class IHomeAdapter(Interface):
    content = Text(title=u"Content", required=False)
class ILinksAdapter(Interface):
    content = Text(title=u"Content", required=False)

formlib works and uses the two different adapters implementations.

looks like a bug, can somebody confirm or comment this?

cheers
Dominique



More information about the Zope3-users mailing list