[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser - Adding.py:1.5

Jim Fulton jim@zope.com
Fri, 12 Jul 2002 09:26:10 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv29219/Container/Views/Browser

Modified Files:
	Adding.py 
Log Message:
Fixed bug in add-menu context tracking that caused the new breadcrumbs
feature to break. The Adding traversal code was not context-aware so
the context wrapper for the adding objects was lost.



=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/Adding.py 1.4 => 1.5 ===
 from Zope.ComponentArchitecture \
      import getView, getService, createObject, queryFactory, queryView
 from Zope.App.PageTemplate import ViewPageTemplateFile
+from Zope.ContextWrapper import ContextMethod, getbaseobject
 
 class Adding(BrowserView):
 
@@ -75,10 +76,12 @@
 
         factory = queryFactory(self.context, name)
         if factory is None:
-            return super(Adding, self).publishTraverse(request, name)
+            return super(Adding, getbaseobject(self)
+                         ).publishTraverse(request, name)
 
         return factory
 
+    publishTraverse = ContextMethod(publishTraverse)
     
     #
     ############################################################