[Zope3-dev] RFC: preCreation view, postCreation view use cases

Casey Duncan casey@zope.com
Thu, 28 Mar 2002 12:30:18 -0700


Hmm, then couldn't we create a utility that given a meta_type and 
container could return the appropriate adapter instance (or possibly 
just a decorator of the container)? I guess I need to look at the code...

-Casey

Gary Poster wrote:
> From: "Casey Duncan" <casey@zope.com>
> 
>>In light of that, what may work is an adapter implementation that wraps
>>the view component necessary to instanciate an object around the
>>container. You would simply get the correct adapter and then display the
>>appropriate page template in it, starting with the default one for that
>>view.
>>
> 
> Hey Casey.
> 
> If I remember my sprint lessons correctly (while we were building part of
> the component api browser, which needed an adapter to provide a view), I
> believe the problem with this is that a view has to be registered to the
> actual container even if it is going to be using an adapter (see the zcml in
> Zope.App.OFS.Introspector to see what I mean).  This means muddying in the
> Container view namespace, as I said in another email.
> 
> Another aspect of the problem is that you can't get an Adapter by name.
> 
> If I'm off base somewhere, somebody correct me.
> 
> Gary
> 
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev@zope.org
> http://lists.zope.org/mailman/listinfo/zope3-dev
> 
>