[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser - Adder.py:1.1.4.1.2.1 Bindings.py:1.1.4.1.2.1

Jim Fulton jim@zope.com
Wed, 29 May 2002 11:10:15 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv12181/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser

Modified Files:
      Tag: Zope3InWonderland-branch
	Adder.py Bindings.py 
Log Message:
- Added permission_id attribute to adapter and utility directives.

- Got rid of old getView, getResource, and getDefaultViewName.
  Renamed getRequestView to getView (and so on).

  Changed view interface to use context, rather than getContext.

  Introduced notion of presentation types (e.g. IBrowserPresentation, 
  which is cleaner than IBrowserPublisher).

- Began converting to get/queryFoo, which is much nicer.

- Many formatting fixups.



=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/Adder.py 1.1.4.1 => 1.1.4.1.2.1 ===
     def _listAddables(self):
         # Override to look up from the service class registry.
-        return getAddableServices(self.getContext())
+        return getAddableServices(self.context)
 


=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/Bindings.py 1.1.4.1 => 1.1.4.1.2.1 ===
 
 from Zope.App.PageTemplate import ViewPageTemplateFile
-from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
+from Zope.Publisher.Browser.BrowserView import BrowserView
 from Zope.ComponentArchitecture.ContextDependent import ContextDependent
 from Zope.ComponentArchitecture.Exceptions import ComponentLookupError
 from Zope.Proxy.ProxyIntrospection import removeAllProxies
 
-class Bindings(AttributePublisher, ContextDependent):
+class Bindings(BrowserView):
 
     index = ViewPageTemplateFile('services_bindings.pt')
 
     def getServicesTable(self):
         """
         """
-        context = self.getContext()
+        context = self.context
         allServices = removeAllProxies(context.getServiceDefinitions())
         localServices = removeAllProxies(context.objectItems())
         services = []
@@ -65,7 +65,7 @@
         # boundService is a dict service_name:bound_name
         # the bound_names Acquired and None are special
         
-        context = self.getContext()
+        context = self.context
         
         change_count = 0