[Zope3-dev] Re: run-time adapter registration and un-registration

Philipp von Weitershausen philipp at weitershausen.de
Tue Feb 13 06:22:02 EST 2007


On 13 Feb 2007, at 12:14 , Jim Fulton wrote:
> On Feb 13, 2007, at 5:11 AM, Philipp von Weitershausen wrote:
>
>> Chris,
>>
>> (wrong list, btw... such posts belong on zope3-users at zope.org)
>>
>>> I'd like to build a UI that allows a user to changing what  
>>> adapters (views in particular) are assigned to an interface  
>>> through a web interface.
>>> The sounds like it's going to require runtime assigned and un- 
>>> assignment of adapters.
>>> Has anyone tried this before?
>>
>> Well, we do it all the time with persistent, local components (not  
>> necessarily with adapters but with utilities).
>
> The key is that we haven't done it (recently) with adapters, so  
> this is some virgin territory. I believe I've seen a report of a  
> problem with local adapter registrations but it's been lost in my  
> old email.  Hopefully, whoever sent me the mail will chime in or,  
> better yet, submit a collector entry.

In Zope 2 land we've been using local adpater registrations quite  
successfully, actually:

* five.customerize lets you "customize" template-based browser views  
by creating a persistent PageTemplate and registering that as an  
adapter locally.

* plone.portlets, the new portlet system in Plone 3, registers  
content provides locally

* kss.core registers a local event handler just for AJAX views





More information about the Zope3-dev mailing list