broken rename after creation due to initializeArchetype tweak

David Bain david.bain at alteroo.com
Thu Sep 27 15:30:07 UTC 2007


ObjectAdded Event?
Sounds like the whole events, utilties, adapters thing is coming to bite
me... again
I've been moving slowly to the new paradigm, starting with browser views.

Do you have a quick example? It would really help.

On 9/27/07, Raphael Ritz <r.ritz at biologie.hu-berlin.de> wrote:
>
> 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
>
>
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> http://lists.plone.org/mailman/listinfo/product-developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20070927/8d7f5ad5/attachment.html>


More information about the Product-Developers mailing list