[Zope3-checkins] CVS: Zope3/src/zope/app/browser/content - configure.zcml:1.9
Jim Fulton
jim@zope.com
Tue, 31 Dec 2002 13:27:23 -0500
Update of /cvs-repository/Zope3/src/zope/app/browser/content
In directory cvs.zope.org:/tmp/cvs-serv1916/src/zope/app/browser/content
Modified Files:
configure.zcml
Log Message:
Hold on to your butts! :)
In an effort to make zcml view definitions even easier to understand
(see
http://dev.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/ZCMLBrowserViewDirectiveSimplification
)
I've finished a long-overdue refactoring of the configuration
directives for defining views. The logic is now a good bit less
complicated.
I also simplified the way security assertions on views were
handled. To make this work right, I had to fix a bug in the
publication machinery. Now, as objects are traversed, the results of
traversal are put in security proxies. This is really necessary to
treat URLs as "untrusted code", which they are.
I updated the meta-configuration directives for views and ran the zcml
documentation utility, so there is now documentation for the (new)
view directives. See the files 'page', 'pages', and 'view', in
'doc/zcml/namespaces.zope.org/browser'.
I feel these changes are highly desireable for the alpha, but they are
significant enough that the chance of breakage is a lot higher than
I'd like just before the alpha. I'd appreciate it if folks would let
me know if I've broken anything.
=== Zope3/src/zope/app/browser/content/configure.zcml 1.8 => 1.9 ===
--- Zope3/src/zope/app/browser/content/configure.zcml:1.8 Tue Dec 31 04:49:35 2002
+++ Zope3/src/zope/app/browser/content/configure.zcml Tue Dec 31 13:26:52 2002
@@ -66,10 +66,10 @@
class="zope.app.browser.content.i18n.I18nFileView"
/>
- <browser:view
+ <browser:pages
for="zope.app.interfaces.content.i18nfile.II18nFile"
permission="zope.View"
- factory="zope.app.browser.content.i18n.I18nFileEdit">
+ class="zope.app.browser.content.i18n.I18nFileEdit">
<browser:page
name="editForm.html"
@@ -80,7 +80,7 @@
attribute="action"
/>
- </browser:view>
+ </browser:pages>
<browser:menuItems menu="zmi_views"
for="zope.app.interfaces.content.i18nfile.II18nFile">
@@ -154,15 +154,15 @@
class="zope.app.browser.content.i18nimage.I18nImageData"
/>
- <browser:view
+ <browser:pages
for="zope.app.content.i18nimage.II18nImage"
permission="zope.ManageContent"
- factory="zope.app.browser.content.i18nimage.I18nImageEdit">
+ class="zope.app.browser.content.i18nimage.I18nImageEdit">
<browser:page name="upload.html" template="i18nimageedit.pt" />
<browser:page name="uploadAction.html" attribute="action" />
- </browser:view>
+ </browser:pages>
<browser:menuItems
menu="zmi_views"
@@ -228,7 +228,7 @@
for="zope.app.interfaces.content.folder.IFolder"
permission="zope.ManageContent"
name="create"
- factory="zope.app.browser.content.folder.FolderAdding">
+ class="zope.app.browser.content.folder.FolderAdding">
<browser:page name="index.html" template="add.pt" />
<browser:page name="action.html" attribute="action" />
@@ -252,16 +252,25 @@
description="A simple Folder."
/>
- <browser:view
+ <browser:pages
for="zope.app.interfaces.content.folder.IFolder"
permission="zope.ManageContent"
- factory="zope.app.browser.container.contents.Contents">
+ class="zope.app.browser.container.contents.Contents"
+ >
- <browser:page name="index.html" attribute="index" permission="zope.View" />
<browser:page name="contents.html" attribute="contents" />
<browser:page name="removeObjects.html" attribute="removeObjects" />
- </browser:view>
+ </browser:pages>
+
+ <browser:pages
+ for="zope.app.interfaces.content.folder.IFolder"
+ permission="zope.View"
+ class="zope.app.browser.container.contents.Contents">
+
+ <browser:page name="index.html" attribute="index" />
+
+ </browser:pages>
<browser:page
for="zope.app.interfaces.content.folder.IFolder"
@@ -287,10 +296,10 @@
<!-- SQL Script View Directives -->
- <browser:view
+ <browser:pages
for="zope.app.interfaces.content.sql.ISQLScript"
permission="zope.View"
- factory="zope.app.browser.content.sql.SQLScriptTest"
+ class="zope.app.browser.content.sql.SQLScriptTest"
>
<browser:page name="index.html"
@@ -299,7 +308,7 @@
<browser:page name="testResults.html"
template="sqltestresults.pt"
/>
- </browser:view>
+ </browser:pages>
<browser:editform