[Zope3-checkins] CVS: Zope3/src/zope/app/browser/form - editview.py:1.29
Richard Jones
richard@commonground.com.au
Mon, 14 Jul 2003 20:55:26 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/form
In directory cvs.zope.org:/tmp/cvs-serv23393
Modified Files:
editview.py
Log Message:
This re-enables ObjectModifiedEvent for the content affected by EditView.
There really needs to be ObjectModifiedEvents and ObjectCreatedEvents
genererated by the SequenceWidget and ObjectWidget - but we wouldn't want
to generate too many events... ugh...
=== Zope3/src/zope/app/browser/form/editview.py 1.28 => 1.29 ===
--- Zope3/src/zope/app/browser/form/editview.py:1.28 Sun Jul 13 02:47:16 2003
+++ Zope3/src/zope/app/browser/form/editview.py Mon Jul 14 20:55:21 2003
@@ -101,6 +101,10 @@
try:
changed = applyWidgetsChanges(self, content, self.schema,
names=self.fieldNames, exclude_readonly=True)
+ # We should not generate events whan an adapter is used.
+ # That's the adapter's job.
+ if changed and self.context is self.adapted:
+ publish(content, ObjectModifiedEvent(content))
except WidgetsError, errors:
self.errors = errors
status = u"An error occured."