[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces -
form.py:1.10.4.2
Garrett Smith
garrett at mojave-corp.com
Mon Mar 1 18:33:44 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/interfaces
In directory cvs.zope.org:/tmp/cvs-serv27606/src/zope/app/interfaces
Modified Files:
Tag: garrett-widgets2-branch
form.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/interfaces/form.py 1.10.4.1 => 1.10.4.2 ===
--- Zope3/src/zope/app/interfaces/form.py:1.10.4.1 Thu Feb 26 00:10:56 2004
+++ Zope3/src/zope/app/interfaces/form.py Mon Mar 1 18:33:13 2004
@@ -54,7 +54,7 @@
class ErrorContainer(Exception):
- """A base error class for collecting multiple errors
+ """A base error class for collecting multiple errors.
"""
def append(self, error):
@@ -79,7 +79,14 @@
class WidgetsError(ErrorContainer):
"""A collection of errors from widget processing.
+
+ widgetValues is a map containing the list of values that were obtained
+ from the widget, keyed by field name.
"""
+
+ def __init__(self, errors, widgetsData={}):
+ Exception.__init__(self, *errors)
+ self.widgetsData = widgetsData
class IWidget(IView):
"""Generically describes the behavior of a widget.
@@ -119,7 +126,7 @@
used for the form key.
"""
-class IEditWidget(IWidget):
+class IInputWidget(IWidget):
"""A widget for editing a field value."""
required = Attribute("Flag indicating whether the field is required")
More information about the Zope3-Checkins
mailing list