[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - add.py:1.35 addwizard.py:1.12 editview.py:1.41 editwizard.py:1.18 schemadisplay.py:1.12

Jim Fulton cvs-admin at zope.org
Fri Nov 21 12:10:11 EST 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv30359/src/zope/app/browser/form

Modified Files:
	add.py addwizard.py editview.py editwizard.py schemadisplay.py 
Log Message:
There is no longer a global service as a module global. Changed to use
zapi.getService(None, servicename) to get the global view.

Views must now be registered for request rather than presentation
types.


=== Zope3/src/zope/app/browser/form/add.py 1.34 => 1.35 ===
--- Zope3/src/zope/app/browser/form/add.py:1.34	Mon Nov  3 16:38:02 2003
+++ Zope3/src/zope/app/browser/form/add.py	Fri Nov 21 12:10:10 2003
@@ -17,6 +17,7 @@
 """
 import sys
 
+from zope.app import zapi
 from zope.app.browser.form.editview import EditView
 from zope.app.browser.form.submit import Update
 from zope.app.event import publish
@@ -26,9 +27,9 @@
 from zope.app.interfaces.form import WidgetsError
 from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+from zope.component.servicenames import Presentation
 from zope.component import getAdapter
-from zope.component.view import provideView
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.schema.interfaces import ValidationError
 from zope.security.checker import defineChecker, NamesChecker
 
@@ -162,4 +163,5 @@
                     )
                   )
 
-    provideView(for_, name, IBrowserPresentation, class_, layer)
+    s = zapi.getService(None, zapi.servicenames.Presentation)
+    s.provideView(for_, name, IBrowserRequest, class_, layer)


=== Zope3/src/zope/app/browser/form/addwizard.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/browser/form/addwizard.py:1.11	Wed Oct 22 15:17:09 2003
+++ Zope3/src/zope/app/browser/form/addwizard.py	Fri Nov 21 12:10:10 2003
@@ -17,6 +17,7 @@
 """
 import sys
 
+from zope.app import zapi
 from zope.app.event import publish
 from zope.app.event.objectevent import ObjectCreatedEvent
 from zope.app.form.utility import setUpWidgets
@@ -24,8 +25,7 @@
 from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 from zope.component import getAdapter
-from zope.component.view import provideView
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.schema.interfaces import ValidationError
 from zope.security.checker import defineChecker, NamesChecker
 from editwizard import EditWizardView, WizardStorage
@@ -134,4 +134,5 @@
                     )
                   )
 
-    provideView(for_, name, IBrowserPresentation, class_, layer)
+    s = zapi.getService(None, zapi.servicenames.Presentation)
+    s.provideView(for_, name, IBrowserRequest, class_, layer)


=== Zope3/src/zope/app/browser/form/editview.py 1.40 => 1.41 ===
--- Zope3/src/zope/app/browser/form/editview.py:1.40	Thu Oct 23 10:54:32 2003
+++ Zope3/src/zope/app/browser/form/editview.py	Fri Nov 21 12:10:10 2003
@@ -17,11 +17,11 @@
 """
 from datetime import datetime
 
+from zope.app import zapi
 from zope.schema import getFieldNamesInOrder
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.app.publisher.browser import BrowserView
 from zope.security.checker import defineChecker, NamesChecker
-from zope.component.view import provideView
 from zope.component import getAdapter
 
 from zope.app.i18n import ZopeMessageIDFactory as _
@@ -139,4 +139,5 @@
                                 "browserDefault", "publishTraverse"),
                                permission))
 
-    provideView(for_, name, IBrowserPresentation, class_, layer)
+    s = zapi.getService(None, zapi.servicenames.Presentation)
+    s.provideView(for_, name, IBrowserRequest, class_, layer)


=== Zope3/src/zope/app/browser/form/editwizard.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/browser/form/editwizard.py:1.17	Mon Nov  3 16:38:01 2003
+++ Zope3/src/zope/app/browser/form/editwizard.py	Fri Nov 21 12:10:10 2003
@@ -15,15 +15,15 @@
 
 $Id$
 """
+from zope.app import zapi
 from zope.app.i18n import ZopeMessageIDFactory as _
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.component import getAdapter
 from zope.app.publisher.browser.globalbrowsermenuservice import \
      globalBrowserMenuService
 from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
 from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
 from zope.security.checker import defineChecker, NamesChecker
-from zope.component.view import provideView
 from zope.app.form.utility \
         import setUpEditWidgets, getWidgetsData, applyWidgetsChanges
 from zope.app.interfaces.form import WidgetInputError
@@ -231,6 +231,7 @@
         NamesChecker(("__call__", "__getitem__", "browserDefault"), permission)
         )
 
-    provideView(for_, name, IBrowserPresentation, class_, layer)
+    s = zapi.getService(None, zapi.servicenames.Previous)
+    s.provideView(for_, name, IBrowserRequest, class_, layer)
 
 


=== Zope3/src/zope/app/browser/form/schemadisplay.py 1.11 => 1.12 ===
--- Zope3/src/zope/app/browser/form/schemadisplay.py:1.11	Sun Sep 21 13:30:36 2003
+++ Zope3/src/zope/app/browser/form/schemadisplay.py	Fri Nov 21 12:10:10 2003
@@ -15,12 +15,13 @@
 
 $Id$
 """
+from zope.app import zapi
+
 from zope.schema import getFieldNamesInOrder
 
-from zope.publisher.interfaces.browser import IBrowserPresentation
+from zope.publisher.interfaces.browser import IBrowserRequest
 from zope.app.publisher.browser import BrowserView
 from zope.security.checker import defineChecker, NamesChecker
-from zope.component.view import provideView
 from zope.component import getAdapter
 
 from zope.app.form.utility import setUpDisplayWidgets
@@ -82,4 +83,5 @@
     defineChecker(class_,
                   NamesChecker(("__call__", "__getitem__", "browserDefault"),
                                permission))
-    provideView(for_, name, IBrowserPresentation, class_, layer)
+    s = zapi.getService(None, zapi.servicenames.Prefix)
+    s.provideView(for_, name, IBrowserRequest, class_, layer)




More information about the Zope3-Checkins mailing list