Hash: SHA1

Martin Aspeli wrote:
> Hi folks,
> I see that Yuppie has been experimenting with add forms. From what I can 
> tell, he's using a custom formlib base class and registering views as 
> e.g. addFile.html. It also look as if he's registering that view as an 
> action in portal_actions, in the 'folder' category.
> Plone currently supports add forms for the IAdding (+) view in a 
> somewhat ugly way (it looks to see if there's a view for IAdding with 
> the same name as the 'factory' set in the FTI of an addable type, and if 
> so, provides a link to it). IAdding can be a bit painful, so we're 
> interested in supporting an approach based on simple views.
> It's also worth noting that z3c.form (via plone.z3cform, which should be 
> plain CMF compatible, though you may want a different default template) 
> has support for such views in quite a generic way. The "CMF" version of 
> that looks like this:
> http://dev.plone.org/plone/browser/plone.z3cform/trunk/plone/z3cform/add.py
> z3c.form is generally nicer to work with than formlib.
> In any case, I'd like to know why you went down the portal_actions route 
> for rendering the add links. I'm not quite sure I like the idea of 
> having this be persistent configuration, separate to the FTI, as the two 
> would need to be kept in sync, and in sync with the view name registered 
> in ZCML.

Putting the policy in the typeinfo objects seems like a much saner place
to keep this stuff than embedding it in a component registry.

> Also, why not try to use the Zope 3 menu concept? There's even a special 
> "add menu" directive.

The Z3 menu stuff seems to me bound up with the needs of the
never-gonna-use-it Z3MI:  it is overcomplicated for little purpose, and
puts too much policy into "emergent" behavior (ordering of component
lookups, for instance).

> I'd quite like to find a good approach here that can be used by both 
> Plone and plain CMF, if possible.

- --
Tres Seaver          +1 540-429-0999          [EMAIL PROTECTED]
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


Zope-CMF maillist  -  Zope-CMF@lists.zope.org

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to