[Zope3-dev] formlib addForm

Gary Poster gary at zope.com
Mon Sep 26 09:02:03 EDT 2005


On Sep 25, 2005, at 3:58 PM, Christian Lueck wrote:
> ...
> zope.app.container.interfaces.IAdding seems most promising -- but what
> to do with it?
>
> Question:
> Is it right to register a formlib-based addview with the
> <browser:page>-directive?

Yep.

> How do I get the + ? ;)

The '+' is an implementation of IAdding.  You first need to register  
the page for the interface, a la


   <browser:page class="path.to.your.view.class" name="addWhatever.html"
            permission="zope.Public"
            for="zope.app.container.interfaces.IAdding" />

and then register a menu item for the adding that points to it, a la

   <browser:addMenuItem
       title="Whatever"
       factory="path.to.your.whatever.factory"
       permission="zope.Public"
       view="addWhatever.html"
       />

The factory is used to get the interface to check constraints.  You  
might be able to do without it; check APIdoc if you are curious.

Gary


More information about the Zope3-dev mailing list