[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/ServiceManager/Views/Browser - Bindings.py:1.1.2.4 services_bindings.pt:1.1.2.4
Gary Poster
garyposter@earthlink.net
Wed, 17 Apr 2002 15:13:06 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/ServiceManager/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv31331/App/OFS/ServiceManager/Views/Browser
Modified Files:
Tag: Zope-3x-branch
Bindings.py services_bindings.pt
Log Message:
This commit makes the following changes:
The hookable zcml mechanism now requires an intermediary method to overwrite: see the hookables in Zope.ComponentArchitecture for an example
IServiceService, Service, and ServiceManager now all have this signature for the getService method: name. They did use context, name. The context, name signature is still used for the main ComponentArchitecture getService function.
the getServiceDefinition function now requires context
A ServiceContainer returns a wrapped ServiceManager; a ServiceManager returns a wrapped Service.
ServiceManager now overrides two ComponentArchitecture hooks: getServiceManager and getNextServiceManager
getNextServiceManager and getNextService are two new ComponentArchitecture functions useful for placeful services
The Zope.Publisher.Browser.BrowserRequest now includes the Zope2 class definition of record: this means that the placeful RoleService is inching forward towards working.
tests have been updated to reflect these changes.
=== Zope3/lib/python/Zope/App/OFS/ServiceManager/Views/Browser/Bindings.py 1.1.2.3 => 1.1.2.4 ===
if bound is None:
- # Because ServiceManager impliments the same interface as
- # the global service manager, it needs to take an "object"
- # which is the location to start the search for ServiceManagers
- # if it's own lookup fails. By default, this is "self"
- acquired = context.getService(self, serviceName)
+ acquired = context.getService(serviceName)
if acquired:
acquiredOrNone = 'Acquired'
bound = acquiredOrNone
=== Zope3/lib/python/Zope/App/OFS/ServiceManager/Views/Browser/services_bindings.pt 1.1.2.3 => 1.1.2.4 ===
<td tal:content="service/name">Name</td>
<td>
- <select tal:attributes="name string:boundService.${service/name}:record">
+ <select tal:attributes="name python:'boundService.%(name)s:record' % service">
<option tal:repeat="available service/services"
tal:attributes="value available;
selected python:service['bound'] == available or None"