[Zope-CMF] Plone:strange behaviour of my own portal type
robert rottermann
robert@redcor.ch
Sun, 26 Jan 2003 23:16:07 +0100
Thanks,
I found that out the hard way ...
Robert
Am Sonntag, 26. Januar 2003 19.11 schrieb Florent Guillaume:
> In article <200301210509.31728.robert@redcor.ch> you write:
> > Now my problem.
> > When all data has been provided trough a "standard" edit screen I wan=
t
> > to=3D
> >
> > rename the object so it reflects first and last name of the user it
> > describes.
> > This I do in the object_edit.py script that is called after the edit
> > sess=3D ion.
> > What i to is I just assign a new value to the id.
> > As a result I have an instance of my portal type with the new id.
> >
> > Now my real problem:
> > externaly the object has a new id. That is in the ZMI (and in folder
> > cont=3D ents)
> > it shows the new Id.
> > Internaly however, that is when I call object.getId() I still get the
> > old=3D id.
> >
> > What could be the reason. Do I have to call a method on the object to
> > set=3D the
> > new id ??
>
> In Zope 2 both the object and its container have to know an object's id=
=2E
> So the only correct way to rename something is to call
> thecontainer.manage_renameObject(oldid, newid)
>
> Florent