On 9/28/07, Frank Burkhardt <[EMAIL PROTECTED]> wrote:

>
> You could use a view as dispatcher which then would be traversed like 
> object/@@view:
>
> class MyDispatcher(object):
>    def __call__(self):
>       
> realview=zapi.getMultiAdapter((self.context,self.context.__parent__,self.request))
>       return realview()
>
> class MyExampleView(object):
>    def __init__(context,parent,request):
>       self.context=context
>       self.parent=parent
>       self.request=request
>
>    def __call__(self):
>       return "Book/shelf-specific html"
>
> *configure.zcml*
> <configure>
>    <browser:page for=".interfaces.IMyBook" name="view" class="MyDispatcher" 
> ... />
>    <zope:adapter for=".interfaces.IMyBook .interfaces.IMyShelf 
> IBrowserRequest" ... />
> </configure>
>

Got it. Thanks.

-- 
Hong Yuan

大管家网上建材超市
装修装潢建材一站式购物
http://www.homemaster.cn
_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to