Objects in transaction-Object do not support absolute_url() (was: Re: [Zope] Catch Object Changes)

Dieter Maurer dieter at handshake.de
Wed Dec 3 15:20:50 EST 2003


Holger Schmidt wrote at 2003-12-3 19:28 +0100:
 > ...
 > New Problem:
 > 
 > now i monkey-patch tpc_finish, but what I get is just the
 > transaction-object.
 > In the transaction-Object I can find the affected Objects of the TA
 > (in the "_objects"-List I think) ...
 > But I cannot get the absolute URL of the affected Objects (cannot use
 > obj.absolute_url()), I think this is because the objects in the
 > transaction-object are not acquisition wrapped, are they?

You are right: they are not acquisition wrapped.

 > Is there a chance to get the path to the object?

In Zope3, but (I fear) not in Zope2.

  Zope3 abandons acquistion (or more generally: "context wrapper"s)
  and puts an explicit parent attribute in objects.

If you have control over the objects, you can emulate
Zope3 behaviour in some sense. E.g. you can code
the path in an attribute of the object (be carefull
with copy/move/rename).

-- 
Dieter



More information about the Zope mailing list