[Zope3-checkins] CVS: Zope3/src/zope/app/presentation - pagefolder.py:1.6 presentation.py:1.18

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Apr 24 19:18:29 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/presentation
In directory cvs.zope.org:/tmp/cvs-serv29065/src/zope/app/presentation

Modified Files:
	pagefolder.py presentation.py 
Log Message:


Interchanged PerissionField and InterfaceField with Choice and Sequence.




=== Zope3/src/zope/app/presentation/pagefolder.py 1.5 => 1.6 ===
--- Zope3/src/zope/app/presentation/pagefolder.py:1.5	Fri Apr 23 09:43:36 2004
+++ Zope3/src/zope/app/presentation/pagefolder.py	Sat Apr 24 19:17:57 2004
@@ -19,9 +19,7 @@
 $Id$
 """
 from zope.interface import Interface, implements
-from zope.schema import BytesLine, Bool, Field
-from zope.app.component.interfacefield import InterfaceField
-from zope.app.security.permission import PermissionField
+from zope.schema import BytesLine, Bool, Field, Choice
 
 from zope.app.container.btree import BTreeContainer
 from zope.fssync.server.entryadapter import ObjectEntryAdapter, AttrMapping
@@ -52,9 +50,10 @@
     This information is used to configure the pages in the folder.
     """
 
-    required = InterfaceField(
+    required = Choice(
         title = _(u"For interface"),
         description = _(u"The interface of the objects being viewed"),
+        vocabulary="Interfaces",
         required = True,
         )
 
@@ -71,9 +70,10 @@
         default = "default",
         )
 
-    permission = PermissionField(
+    permission = Choice(
         title=_(u"Permission"),
         description=_(u"The permission required to use the view"),
+        vocabulary="Permissions",
         required = True,
         )
 


=== Zope3/src/zope/app/presentation/presentation.py 1.17 => 1.18 ===
--- Zope3/src/zope/app/presentation/presentation.py:1.17	Fri Apr 23 09:43:36 2004
+++ Zope3/src/zope/app/presentation/presentation.py	Sat Apr 24 19:17:57 2004
@@ -22,7 +22,6 @@
 from zope.component.presentation import PresentationRegistration
 from zope.security.checker import NamesChecker, ProxyFactory
 
-import zope.app.component.interfacefield
 import zope.app.component.nextservice
 import zope.app.container.contained
 import zope.app.event.interfaces
@@ -296,17 +295,18 @@
 
 class IViewRegistration(zope.app.adapter.IAdapterRegistration):
 
-    required = zope.app.component.interfacefield.InterfaceField(
+    required = zope.schema.Choice(
         title = _(u"For interface"),
         description = _(u"The interface of the objects being viewed"),
+        vocabulary="Interfaces",
         readonly = True,
         required = True,
-        basetype = None
         )
 
-    requestType = zope.app.component.interfacefield.InterfaceField(
+    requestType = zope.schema.Choice(
         title = _(u"Request type"),
         description = _(u"The type of requests the view works with"),
+        vocabulary="Interfaces",
         readonly = True,
         required = True,
         )




More information about the Zope3-Checkins mailing list