Am 22.04.2008 um 14:27 schrieb yuppie:


Implementing newstyle content factories[1] and using events for content creation[2] made it much easier to create content without using invokeFactory and friends.

These steps are still necessary:

- check portal_type exists (*)
- check allowType(portal_type) for the container (*)
- get factory name for portal_type (*)
- get IFactory utility for the factory name
- use factory for creating an object
- set object's portal_type (*)
- set other object attributes if necessary
- send ObjectCreatedEvent
- add the object to the container using _setObject

The steps marked with (*) are CMF specific.

Today I checked in a formlib based add view for File objects[3]. There is a new "Add File" action available if you use the "Experimental CMFDefault Browser Views" extension profile.

Any feedback is welcome. Not sure if this makes Bug #161664[4] obsolete.

This is excellent news! I have been struggling considerably with invokeFactory() on a recent project.

Does this mean we can develop add_forms analogue to Zope 3? And do I get the goodies just with an svn update?

Charlie Clark
Helmholtzstr. 20
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to