[Zope-CMF] RE: "generic" CookedBody - compound/composite docs

marc lindahl marc@bowery.com
Mon, 13 Aug 2001 18:48:03 -0400


> From: "Jon Edwards" <jon@pcgs.freeserve.co.uk>
> 
> Won't the method used to render depend not only on the object's
> workflow-state, but also on the context it is called from? i.e. the settings
> in the compound/composite doc, the rights of the person viewing it, the
> country they come from, the current date.... ?

Sure... and that's a core issue.  But just as each simple object's 'view'
form knows this, why shouldn't CookedBody... unless I'm missing something.
When the object is called, there's the REQUEST variable with
authenticated_user, there's context, container, _, etc...  shouldn't it be
able to work?


> I'm not sure how you'd get all that logic into the content-object,
> especially as it will vary so much?

My point exactly -- have that complicated logic contained (and perhaps
inherited?)

>...and how will it know which bit of
> logic to use for different compounds in different contexts? ...you'd have to
> pass it a whole load of variables/properties and it would have to have a
> load of rules to cover all the different permutations?

Going back to the simple type's (like, File, Image, Document) 'view'
methods, they can tell all this from the environment from which they are
called (see above), so they should still be able to through a compound
document.