[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Forms - IWidget.py:1.3.4.2 Widget.py:1.3.6.1
Jim Fulton
jim@zope.com
Mon, 28 Oct 2002 11:51:55 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Forms
In directory cvs.zope.org:/tmp/cvs-serv29831/lib/python/Zope/App/Forms
Modified Files:
Tag: Zope3-Bangalore-TTW-Branch
IWidget.py Widget.py
Log Message:
Changed the form widget interfaces:
- Widgets now have a setData method for setting their initial
data. This is the data that will be displayed absent user input.
- Browser widgets should now be called without arguments to render.
If there is initial data, it should be passed with setData prior to
rendering. This change was made to allow widgets to be rendered in
ZPT without resorting to python expressions.
- Browser widgets now have a 'hidden' method to render the widgets as
hidden fields. The hidden method is called without arguments.
- Removed the unused, except in tests, hidden attribute that was,
presumably, a flag indicating that a widget should render as hidden.
- Deprecated the render and renderHidden methods. These need to be
refactored out after the Zope3-Bangalore-TTW-Branch branch is merged
into the trunk.
- Changed the render method (back) so that it requires a value
argument.
=== Zope3/lib/python/Zope/App/Forms/IWidget.py 1.3.4.1 => 1.3.4.2 ===
--- Zope3/lib/python/Zope/App/Forms/IWidget.py:1.3.4.1 Tue Oct 22 10:18:08 2002
+++ Zope3/lib/python/Zope/App/Forms/IWidget.py Mon Oct 28 11:51:24 2002
@@ -51,9 +51,9 @@
This is the text that will be used to label the widget.
"""
- def setData(value):
- """Set the default data for the widget.
-
- The given value should only be used if the user hasn't entered any data
- and the data should be a valid data for the field.
+ def setData(value):
+ """Set the default data for the widget.
+
+ The given value should only be used if the user hasn't entered
+ any data and the data should be a valid data for the field.
"""
=== Zope3/lib/python/Zope/App/Forms/Widget.py 1.3 => 1.3.6.1 ===
--- Zope3/lib/python/Zope/App/Forms/Widget.py:1.3 Sat Sep 7 12:18:48 2002
+++ Zope3/lib/python/Zope/App/Forms/Widget.py Mon Oct 28 11:51:24 2002
@@ -19,8 +19,10 @@
from Zope.App.Forms.Exceptions import WidgetInputError
class Widget(object):
- """I do not know what will be in this class, but it provides an extra
- layer."""
+ """Mix-in class providing some functionality common accross view types
+ """
+
+
__implements__ = IWidget
def __init__(self, context, request):