Personal tools
You are here: Home Members nigel Nigels Blog Archive 2006 July 24 Cleaning up after cancelled AT, and still using the parent node

Cleaning up after cancelled AT, and still using the parent node

An AT BaseContent derived product does not clean up after itself if I go Add, then press Cancel. I'm left with an object "named" [...]. As explained here, you need to register your type with the portal_factor so that cancellations are cleaned up. However, doing this means you can't use the self.getParentNode() method until the object is saved. So defaults and the like will not work if they derive their values from the parent. There is a methid, self.getFolderWhenPortalFactory(), which overcomes this problem. If you are not using the portal_factory then it will just return the parent. If you are using the portal_factory then it will return the folder where the object was created!


powered by performancing firefox

Posted by nigel on 2006-07-24 20:41

Trackback

The URI to TrackBack this entry is: #

Powered by Plone, the Open Source Content Management System