[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/Formulator - Form.py:1.1.2.3 __init__.py:1.1.2.3 FormulatorProposal.stx:NONE FormulatorProposal2.stx:NONE
Stephan Richter
srichter@cbu.edu
Wed, 27 Mar 2002 09:24:08 -0500
Update of /cvs-repository/Zope3/lib/python/Zope/App/Formulator
In directory cvs.zope.org:/tmp/cvs-serv9605
Modified Files:
Tag: Zope-3x-branch
Form.py __init__.py
Removed Files:
Tag: Zope-3x-branch
FormulatorProposal.stx FormulatorProposal2.stx
Log Message:
Major changes in Formulator (for details see
srichter-OFS_Formulator-branch checkins):
- Created simple registries for validators, fields and so on.
- Made Formulator compatible with new Publisher code
- Adjusted for better usibility.
Note: More to come as Formulaot is bring developed.
=== Zope3/lib/python/Zope/App/Formulator/Form.py 1.1.2.2 => 1.1.2.3 ===
#from IForm import IForm
from Zope.ComponentArchitecture import getRequestView
+from Zope.App.Formulator.IPropertyFieldAdapter import IPropertyFieldAdapter
+from Zope.App.Formulator.Errors import ValidationError
+from Zope.ComponentArchitecture import getAdapter
class Form(AttributePublisher):
@@ -64,7 +67,7 @@
if errors == []:
for widget in self.getFieldViews(REQUEST):
field = widget.getContext()
- field.setPropertyInContext(values[field.id])
+ getAdapter(field, IPropertyFieldAdapter).setPropertyInContext(values[field.id])
return self.index(REQUEST, errors=errors)
=== Zope3/lib/python/Zope/App/Formulator/__init__.py 1.1.2.2 => 1.1.2.3 ===
#
-# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
+# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
@@ -14,3 +15,6 @@
$Id$
"""
+
+from FieldRegistry import registerField, getField
+from ValidatorRegistry import registerValidator, getValidator
=== Removed File Zope3/lib/python/Zope/App/Formulator/FormulatorProposal.stx ===
=== Removed File Zope3/lib/python/Zope/App/Formulator/FormulatorProposal2.stx ===