[Zope3-checkins] CVS: Zope3/src/zope/app/browser/workflow/stateful - contentworkflow.py:1.7.32.2 instance.py:1.10.28.2

Garrett Smith garrett at mojave-corp.com
Mon Mar 1 18:33:42 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/browser/workflow/stateful
In directory cvs.zope.org:/tmp/cvs-serv27606/src/zope/app/browser/workflow/stateful

Modified Files:
      Tag: garrett-widgets2-branch
	contentworkflow.py instance.py 
Log Message:
Changes related to widget machinery:

- Added source argument to setUpEditWidgets and setUpDisplayWidgets.
- Renamed IEditWidget to IInputWidget.
- Added a widgetsData attribute to zope.app.interfaces.formWidgetsError.



=== Zope3/src/zope/app/browser/workflow/stateful/contentworkflow.py 1.7.32.1 => 1.7.32.2 ===
--- Zope3/src/zope/app/browser/workflow/stateful/contentworkflow.py:1.7.32.1	Thu Feb 26 00:10:53 2004
+++ Zope3/src/zope/app/browser/workflow/stateful/contentworkflow.py	Mon Mar  1 18:33:11 2004
@@ -20,7 +20,7 @@
 from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.form.utility import setUpWidgets
 from zope.app.services.servicenames import Workflows
-from zope.app.interfaces.form import IEditWidget
+from zope.app.interfaces.form import IInputWidget
 from zope.component import getService
 from zope.interface import Interface
 from zope.publisher.browser import BrowserView
@@ -57,7 +57,7 @@
 
     def __init__(self, *args):
         super(ManageContentProcessRegistry, self).__init__(*args)
-        setUpWidgets(self, IContentProcessMapping, IEditWidget)
+        setUpWidgets(self, IContentProcessMapping, IInputWidget)
         self.process_based = int(self.request.get('process_based', '1'))
 
     def getProcessInterfacesMapping(self):


=== Zope3/src/zope/app/browser/workflow/stateful/instance.py 1.10.28.1 => 1.10.28.2 ===
--- Zope3/src/zope/app/browser/workflow/stateful/instance.py:1.10.28.1	Thu Feb 26 00:10:53 2004
+++ Zope3/src/zope/app/browser/workflow/stateful/instance.py	Mon Mar  1 18:33:11 2004
@@ -18,6 +18,7 @@
 from zope.app.browser.form.submit import Update
 from zope.app.form.utility import setUpWidget, applyWidgetsChanges
 from zope.app.i18n import ZopeMessageIDFactory as _
+from zope.app.interfaces.form import IInputWidget
 from zope.app.interfaces.dublincore import IZopeDublinCore
 from zope.app.interfaces.workflow import IProcessInstanceContainer
 from zope.app.interfaces.workflow import IProcessInstanceContainerAdaptable
@@ -45,7 +46,7 @@
             # setUpWidget() does not mutate the field, so it is ok.
             field = trustedRemoveSecurityProxy(field)
             # XXX OZ
-            setUpWidget(self, name, field,
+            setUpWidget(self, name, field, IInputWidget,
                         value=getattr(workflow.data, name))
         
     def _extractContentInfo(self, item):
@@ -140,8 +141,8 @@
 
         if Update in self.request and workflow.data is not None:
             schema = trustedRemoveSecurityProxy(workflow.data.getSchema())
-            changed = applyWidgetsChanges(self, schema, 
-                names=getFields(schema).keys(), context=workflow.data)
+            changed = applyWidgetsChanges(self, schema, target=workflow.data, 
+                names=getFields(schema).keys())
             if changed:
                 status = _('Updated Workflow Data.')
 




More information about the Zope3-Checkins mailing list