[Zope-dev] Success! Was: Re: [Zope-dev] How is 'retrieveItem intended to work with TTW Specialists? Specialists?

Phillip J. Eby pje@telecommunity.com
Thu, 05 Oct 2000 06:21:50 -0500


At 09:15 PM 10/4/00 -0500, Steve Spicklemire wrote:
>
>This was also nice since in my Specialist I could do things
>like:
>
><dtml-call "RESPONSE.redirect(this().theRealThing.absolute_url())">
>
>After the user is finished working in my 'app area' they could
>get redirected back to the actual object that my Specialist
>was 'posing' for...

I don't really recommend the above, unless it's being done by SkinScript.
Otherwise, you're unnecessarily exposing an implementation attribute
(theRealThing).  Instead, require that your object implement a redirect()
method, and define it in the class as "class_default_for_redirect".  Then
you can override the method in SkinScript or with a class extender (a new
0.4.3 feature).  Doing it this way means your framework code will not
incorporate an assumption that your whitebox specialist is always going to
be wrapping someone else's objects.