[Zope-CMF] CMF Tests: 9 OK

2008-07-12 Thread CMF Tests Summarizer
Summary of messages to the cmf-tests list.
Period Fri Jul 11 11:00:00 2008 UTC to Sat Jul 12 11:00:00 2008 UTC.
There were 9 messages: 9 from CMF Tests.


Tests passed OK
---

Subject: OK : CMF-1.6 Zope-2.8 Python-2.3.6 : Linux
From: CMF Tests
Date: Fri Jul 11 21:36:30 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009290.html

Subject: OK : CMF-1.6 Zope-2.9 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:38:00 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009291.html

Subject: OK : CMF-2.0 Zope-2.9 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:39:30 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009292.html

Subject: OK : CMF-2.0 Zope-2.10 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:41:00 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009293.html

Subject: OK : CMF-2.1 Zope-2.10 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:42:31 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009294.html

Subject: OK : CMF-2.1 Zope-2.11 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:44:01 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009295.html

Subject: OK : CMF-trunk Zope-2.10 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:45:31 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009296.html

Subject: OK : CMF-trunk Zope-2.11 Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:47:01 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009297.html

Subject: OK : CMF-trunk Zope-trunk Python-2.4.4 : Linux
From: CMF Tests
Date: Fri Jul 11 21:48:32 EDT 2008
URL: http://mail.zope.org/pipermail/cmf-tests/2008-July/009298.html

___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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


[Zope-CMF] Re: Add forms and menus

2008-07-12 Thread yuppie

Hi Martin!


Martin Aspeli wrote:
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.


That's correct. But I have to mention that not all parts of these 
changes have reached the same stage of maturation. Using 'folder' 
category Actions is a temporary hack to generate menu items for the new 
add forms. I'm glad you want to help to find a better solution.


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.


Good.

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.


Maybe we should discuss this in a different thread. Here a short reply: 
My code for the AddForm would look quite different, especially for CMF 
trunk, but in general that's the way to go. Since z3c.form became the 
standard in the Zope 3 world I'd like to see Zope 2 and CMF moving in 
the same direction. Unfortunately using plone.z3cform is no option for 
CMF because it has a different license and repository. *If* Plone wants 
to donate that code to the Zope Foundation or someone writes something 
similar (maybe five.z3cform), I'd be happy to help with CMF integration.


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.


CMF makes a distinction between portal types and content types. Portal 
types are persistent wrappers around the non-persistent content types. 
You can define many different portal types based on one content type.


In CMF you add *portal type* instances, so the 'add' links should be 
persistent as well. The non-persistent add form has to take the portal 
type name as argument to create the correct portal type.


I'm not sure what the right solution is, but I guess extending the type 
info classes will be the best approach.


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


Moving away from persistent actions is not on my todo list. And as I 
tried to explain above, the current portal type concept depends on 
persistent actions.


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


I hope you find one ;)


Cheers,

Yuppie


___
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

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