[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser - Adder.py:1.1.4.2 Bindings.py:1.1.4.2 browser.zcml:1.1.4.3 services_bindings.pt:1.1.4.2
Jim Fulton
jim@zope.com
Fri, 7 Jun 2002 10:41:46 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv12187/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser
Modified Files:
Tag: Zope-3x-branch
Adder.py Bindings.py browser.zcml services_bindings.pt
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/ServiceManager/Views/Browser/Adder.py 1.1.4.1 => 1.1.4.2 ===
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.2 ===
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
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/browser.zcml 1.1.4.2 => 1.1.4.3 ===
>
-<security:protectClass
- class="Zope.App.OFS.Services.ServiceManager.Views.Browser.Contents."
- permission_id="Zope.ManageServices"
- names="index, listContentInfo, remove, removeObjects, confirmRemoved"/>
-
-<browser:defaultView
- name="contents"
- for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
- factory="Zope.App.OFS.Services.ServiceManager.Views.Browser.Contents." />
-
-<security:protectClass
- class="Zope.App.OFS.Services.ServiceManager.Views.Browser.Adder."
- permission_id="Zope.ManageServices"
- names="index, confirmed, action, listAddableInfo"/>
-
-<browser:view
- name="adder"
- for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
- factory="Zope.App.OFS.Services.ServiceManager.Views.Browser.Adder." />
-
-<security:protectClass
- class="Zope.App.OFS.Services.ServiceManager.Views.Browser.Bindings."
- permission_id="Zope.ManageServices"
- names="index, action, getServicesTable" />
-
-<browser:view
- name="bindings"
- for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
- factory="Zope.App.OFS.Services.ServiceManager.Views.Browser.Bindings." />
-
-
-<zmi:tabs for="Zope.App.OFS.Services.ServiceManager.ServiceManager.IServiceManager.">
- <zmi:tab label="Contents" action="contents;view"/>
- <zmi:tab label="Bindings" action="bindings;view"/>
-</zmi:tabs>
+ <browser:defaultView
+ for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
+ name="index.html"
+ />
+
+ <browser:view
+ for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
+ permission="Zope.ManageServices"
+ factory=".Contents."
+ >
+
+ <browser:page name="index.html"
+ attribute="index"
+ />
+ <browser:page name="addServiceManager.html"
+ attribute="addServiceManager"
+ />
+
+ </browser:view>
+
+ <browser:view
+ permission="Zope.ManageServices"
+ for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
+ factory=".Adder.">
+
+ <browser:page name="addForm.html"
+ attribute="index"
+ />
+ <browser:page name="add.html"
+ attribute="action"
+ />
+
+ </browser:view>
+
+ <browser:view
+ permission="Zope.ManageServices"
+ for="Zope.App.OFS.Services.ServiceManager.IServiceManager."
+ factory=".Bindings." >
+
+ <browser:page name="bindings.html"
+ attribute="index"
+ />
+ <browser:page name="changeBindings.html"
+ attribute="action"
+ />
+
+ </browser:view>
+
+
+ <zmi:tabs
+ for="Zope.App.OFS.Services.ServiceManager.ServiceManager.IServiceManager.">
+ <zmi:tab label="Contents" action="./view::index.html"/>
+ <zmi:tab label="Bindings" action="./view::bindings.html"/>
+ </zmi:tabs>
</zopeConfigure>
=== Zope3/lib/python/Zope/App/OFS/Services/ServiceManager/Views/Browser/services_bindings.pt 1.1.4.1 => 1.1.4.2 ===
</head>
<body metal:fill-slot="body" >
- <form action="action" method="post">
+ <form action="changeBindings.html" method="post">
<table>
<tr><th>Name</th><th>boundService</th></tr>
<tr tal:repeat="service view/getServicesTable">