[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - editview.py:1.16

Tres Seaver tseaver@zope.com
Wed, 26 Mar 2003 12:13:14 -0500


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

Modified Files:
	editview.py 
Log Message:


  - Wrap the adapted object in the context, to permit rendering the
    breadcrumbs on the view.


=== Zope3/src/zope/app/browser/form/editview.py 1.15 => 1.16 ===
--- Zope3/src/zope/app/browser/form/editview.py:1.15	Fri Mar 21 15:57:44 2003
+++ Zope3/src/zope/app/browser/form/editview.py	Wed Mar 26 12:13:14 2003
@@ -21,6 +21,7 @@
 from zope.schema import getFieldNamesInOrder
 
 from zope.configuration.action import Action
+from zope.proxy.context import ContextWrapper
 from zope.publisher.interfaces.browser import IBrowserPresentation
 from zope.publisher.browser import BrowserView
 from zope.security.checker import defineChecker, NamesChecker
@@ -67,7 +68,7 @@
         #       just using 'queryAdapter'.
         adapted = queryAdapter(context, self.schema)
         if adapted is not None:
-            context = adapted
+            context = ContextWrapper(adapted, context, name='(adapted)')
         super(EditView, self).__init__(context, request)
         self._setUpWidgets()