[Zope3-checkins] CVS: Zope3/src/zope/app/browser/skins/rotterdam -
editingwidgets.py:1.3
Garrett Smith
garrett at mojave-corp.com
Wed Aug 13 18:29:00 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/skins/rotterdam
In directory cvs.zope.org:/tmp/cvs-serv9151/src/zope/app/browser/skins/rotterdam
Modified Files:
editingwidgets.py
Log Message:
Made the following changes to the widget machinery:
- Renamed IWidget getData to getInputValue
getInputValue no longer accepts an 'optional' flag. If value is missing or is invalid, getInputValue will raise an error. Calls made to this method should be in a try...except block to handle such conditions.
- Renamed IWidget haveData to hasInput
- Added method hasValidInput to IWidget and widget implementations
- Renamed IWidget setData to setRenderedValue
- Added functional tests for some of the core widgets - additional ftests are needed
- Deleted the class PossibleEmptyMeansMissing - it's no longer needed
- Added deprecation tests for changes to widgets
- Some widgets were refactored to use the new framework correctly
These changes were based on the proposal:
http://dev.zope.org/Zope3/ComponentArchitecture/WidgetsFormsSchemas
Not all the changes in the proposal are included in this commit. Specifically, getRawData/setRawData and the refactoring of the widget error classes are the two major changes not included in this commit.
=== Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py:1.2 Wed Apr 30 19:37:58 2003
+++ Zope3/src/zope/app/browser/skins/rotterdam/editingwidgets.py Wed Aug 13 17:28:25 2003
@@ -20,11 +20,10 @@
from types import ListType, TupleType
ListTypes = (ListType, TupleType)
-from zope.app.browser.form.widget import PossiblyEmptyMeansMissing,\
- BrowserWidget, renderElement
+from zope.app.browser.form.widget import BrowserWidget, renderElement
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
-class SimpleEditingWidget(PossiblyEmptyMeansMissing, BrowserWidget):
+class SimpleEditingWidget(BrowserWidget):
"""Improved textarea editing, with async saving using JavaScript."""
propertyNames = BrowserWidget.propertyNames + ['width', 'height', 'extra']
More information about the Zope3-Checkins
mailing list