[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/Views/Browser - Control.py:1.1.2.2 browser.zcml:1.1.2.3

Jim Fulton jim@zope.com
Fri, 7 Jun 2002 10:41:44 -0400


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

Modified Files:
      Tag: Zope-3x-branch
	Control.py browser.zcml 
Log Message:
Merging in Zope3InWonderland-branch, which implemented the following
proposals (see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/OldProposals): 
- RenameAllowToRequire

- GroupClassRelatedDirectivesInClassDirective

- ViewInterfaceAndSimplification

- ConsistentUseOfSpacesAsDelimitersInZCMLAttributes

- TwoArgumentViewConstructors

- ImplementsInZCML

- SimpleViewCreationInZCML

- RemoveGetView

- ReplaceProtectWithAllow

- ViewMethodsAsViews

- MergeProtectionAndComponentDefinitions

There were also various security fixes resulting of better integration
of security with components.


=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/Views/Browser/Control.py 1.1.2.1 => 1.1.2.2 ===
 """
 
-from Zope.Publisher.Browser.AttributePublisher import AttributePublisher
+from Zope.Publisher.Browser.BrowserView import BrowserView
 from Zope.ComponentArchitecture.ContextDependent import ContextDependent
 from Zope.Event.IEventService import IEventService
 from Zope.PageTemplate.PageTemplateFile import PageTemplateFile
 from Zope.Proxy.ProxyIntrospection import removeAllProxies
 
-class Control(ContextDependent, AttributePublisher):
-
-    __implements__ = AttributePublisher.__implements__
+class Control(BrowserView):
     __used_for__ = IEventService
 
     def index( self, toggleSubscribeOnBind=0, REQUEST=None):
         if toggleSubscribeOnBind:
-            cntx=removeAllProxies(self.getContext())
+            cntx=removeAllProxies(self.context)
             cntx.subscribeOnBind=not cntx.subscribeOnBind
         return self.__control(REQUEST)
     


=== Zope3/lib/python/Zope/App/OFS/Services/LocalEventService/Views/Browser/browser.zcml 1.1.2.2 => 1.1.2.3 ===
    xmlns:browser='http://namespaces.zope.org/browser'
 >
+  <browser:defaultView 
+      name="control.html"
+      for="Zope.Event.IEventService+"
+      permission="Zope.ManageServices" 
+      factory=".Control." />
 
-<security:protectClass 
-   class=".Control+"
-   permission_id="Zope.ManageServices" 
-   names="index"/>
-
-<browser:defaultView 
-   name="control"
-   for="Zope.Event.IEventService+"
-   factory="Zope.App.OFS.Services.LocalEventService.Views.Browser.Control+" />
-
-<zmi:tabs for="Zope.Event.IEventService+">
-  <zmi:tab label="Control" action="control;view"/>
-</zmi:tabs>
+  <zmi:tabs for="Zope.Event.IEventService+">
+    <zmi:tab label="Control" action="./view::control.html" />
+  </zmi:tabs>
 
 </zopeConfigure>
+
+
+
+