[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces -
form.py:1.9.16.1
Garrett Smith
garrett at mojave-corp.com
Sat Feb 7 21:12:28 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/interfaces
In directory cvs.zope.org:/tmp/cvs-serv3100/src/zope/app/interfaces
Modified Files:
Tag: ozzope-widgets-branch
form.py
Log Message:
Created branch for widget work at ozzope sprint.
=== Zope3/src/zope/app/interfaces/form.py 1.9 => 1.9.16.1 ===
--- Zope3/src/zope/app/interfaces/form.py:1.9 Fri Sep 26 15:53:35 2003
+++ Zope3/src/zope/app/interfaces/form.py Sat Feb 7 21:11:57 2004
@@ -92,12 +92,55 @@
Note that this level must be still presentation independent.
"""
- propertyNames = Attribute("""This is a list of attributes that are
- defined for the widget.""")
+ name = Attribute(
+ """The uniquewidget name
+ This must be unique within a set of widgets.""")
+
+ title = Attribute(
+ """The widget title.
+
+ Title may be translated for the request.""")
+
+ description = Attribute(
+ """The widget description.
+
+ Description may be translated for the request.""")
+
+ visible = Attribute(
+ """A flag indicating whether or not the widget is visible.""")
+
+ # XXX OZ might be able to delete this
+ propertyNames = Attribute(
+ """A list of attributes defined for the widget.""")
+
+ # XXX OZ might be able to delete this
+ def getProperty(name):
+ """Return the specified property value."""
+
+ # XXX OZ might be able to delete this
def getValue(name):
- """Look up a Widget configuration setting by name."""
+ """Deprecated - use getProperty instead."""
+ def setRenderedValue(value):
+ """Set the value to be rendered by the widget.
+
+ Calling this method will override any values provided by the user.
+ """
+
+ def setPrefix(prefix):
+ """Set the name prefix used for the widget
+
+ The widget name is used to identify the widget's data within
+ input data. For example, for HTTP forms, the widget name is
+ used for the form key.
+ """
+
+class IEditWidget(IWidget):
+ """A widget for editing a field value."""
+
+ required = Attribute("Flag indicating whether the field is required")
+
def validate():
"""Validate the widget data.
@@ -126,7 +169,6 @@
See validate() for validation performed.
"""
-
def hasInput():
"""Returns True if the widget has input.
@@ -149,30 +191,6 @@
input provided by the user can be converted to a valid field value
based on the field constraints.
"""
-
- name = Attribute("""The uniquewidget name
-
- This must be unique within a set of widgets.
- """)
-
- title = Attribute(
- """The widget title; may be translated for the request""")
-
- description = Attribute(
- """The widget description; may be translated for the request""")
-
- required = Attribute("Flag indicating whether the field is required")
-
- def setRenderedValue(value):
- """Set the value to be rendered by the widget.
-
- Calling this method will override any values provided by the user.
- """
-
- def setPrefix(prefix):
- """Set the name prefix used for the widget
-
- The widget name is used to identify the widget's data within
- input data. For example, for HTTP forms, the widget name is
- used for the form key.
- """
+
+class IDisplayWidget(IWidget):
+ """A widget for displaying a field value."""
More information about the Zope3-Checkins
mailing list