[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Forms/Views/Browser - FormView.py:1.13
Jim Fulton
jim@zope.com
Fri, 4 Oct 2002 15:49:01 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/Forms/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv4279/lib/python/Zope/App/Forms/Views/Browser
Modified Files:
FormView.py
Log Message:
Added logic to generate object events when objects are modified,
created, or added.
=== Zope3/lib/python/Zope/App/Forms/Views/Browser/FormView.py 1.12 => 1.13 ===
--- Zope3/lib/python/Zope/App/Forms/Views/Browser/FormView.py:1.12 Sat Sep 7 12:18:48 2002
+++ Zope3/lib/python/Zope/App/Forms/Views/Browser/FormView.py Fri Oct 4 15:48:30 2002
@@ -23,6 +23,9 @@
from Zope.ComponentArchitecture import getView
from Zope.Proxy.ProxyIntrospection import removeAllProxies
from Zope.Publisher.Browser.BrowserView import BrowserView
+from Zope.Event.ObjectEvent import ObjectModifiedEvent
+from Zope.Proxy.ContextWrapper import ContextWrapper
+from Zope.Event import publishEvent
from IForm import IForm
@@ -93,6 +96,8 @@
print e[0]
return self.form(self, errors=e)
else:
+ publishEvent(self.context, ObjectModifiedEvent(self.context))
+
# XXX This should do a redirect by looking up the object in
# the view registry
return self.form(self)