Achim Domma wrote:
> I'm implementing an annotations adapter following the "IRatbble" example
> in Philips book. Now I want to have a "Dublin Core" like edit view in ZMI.
> The most simple solution seems to be to register a view for the original
> interface. In this view I would adapt the context object and would then
> use formlib to generate the forms automaticaly.
> But I wonder if this could be done in a declarative way in ZCML.
> Something like "register edit view for IInterfaceA, but adapt it to
> IInterfaceB and create view for this interface".

No, ZCML is just for registering things, e.g. a browser page. It doesn't
really want to know what your browser page does. And a zope.formlib page
form (e.g. an EditForm) is just another browser page to ZCML.

zope.formlib will automatically adapt your object to the form interface
if it doesn't provide it. So, when you have form for IMyObject that uses
form fields from, say, IDublinCore, it will automatically adapt your
object to IDublinCore and save the modifications on the adapter.


Zope3-users mailing list

Reply via email to