Re: [Zope3-Users] How to make content object return a view?

2006-05-26 Thread Benji York

TAHARA Yusei wrote:

You need to use zapi.getMultiAdapter.
(this is a alias for zope.component.getMultiAdapter)


I suggest not using zapi aliases, use the canonical name for things 
instead.  There is a growing dislike for zapi, and I suspect it will be 
deprecated in the future.

--
Benji York
Senior Software Engineer
Zope Corporation
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to make content object return a view?

2006-05-25 Thread TAHARA Yusei
Hi.

>
>I tried zapi.getView(), but this has been deprecated, and I don't quite
>understand the best approach.
>
You need to use zapi.getMultiAdapter.
(this is a alias for zope.component.getMultiAdapter)

Because content view is named multiadapter for content's interface and
IBrowserRequest interface, example below:

  zapi.getMultiAdapter((content, request), IBrowserView, name='index.html')


I recommend to read src/zope/interface/adapter.txt. It is a very good
documentation for adapter and zope component architecture.

Regards,
--
TAHARA Yusei
[EMAIL PROTECTED]
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users