broken rename after creation due to initializeArchetype tweak

Raphael Ritz r.ritz at biologie.hu-berlin.de
Thu Sep 27 14:30:59 UTC 2007


David Bain wrote:

[..]

> 
> currently all my types get added to the portal with names like 
> "meeting.2007-09-26.0637536994" I need to get rename after creation back :(
> 

Some random remarks from my side:

If you add things from code you should know what you are
doing and set the id the way you want from the onset.

I would leave 'initializeArchetype' alone. It's too deep
and early in the process. Use an event handler that you
subscribe for the ObjectAdded event (in the old days
you would have used the 'manage_afterAdd' hook).

'renameAfterCreation' is triggered by processForm
with gets only invoked if objects are added TTW.
This is why you have no effect.

HTH

	Raphael





More information about the Product-Developers mailing list