[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces - dav.py:1.3.4.1 form.py:1.10.4.1

Garrett Smith garrett at mojave-corp.com
Thu Feb 26 00:11:29 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/interfaces
In directory cvs.zope.org:/tmp/cvs-serv25181/src/zope/app/interfaces

Modified Files:
      Tag: garrett-widgets2-branch
	dav.py form.py 
Log Message:
Yet another branch for widgets refactoring (YABFWR).


=== Zope3/src/zope/app/interfaces/dav.py 1.3 => 1.3.4.1 ===
--- Zope3/src/zope/app/interfaces/dav.py:1.3	Tue Feb 24 09:18:04 2004
+++ Zope3/src/zope/app/interfaces/dav.py	Thu Feb 26 00:10:56 2004
@@ -176,11 +176,14 @@
 
 
 class IDAVSchema(IOptionalDAVSchema, IDAV2Schema):
-    """ Full DAV properties schema """
-    pass
+    """A full DAV properties schema."""
 
-class ISimpleDAVWidget(IWidget):
-    """A specialized widget used to render DAV properties output (eg:
-    for the response of a PROPFIND request)"""
-    pass
+class IDAVWidget(IWidget):
+    """A specialized widget used to render DAV properties output."""
+    
+class ITextDAVWidget(IDAVWidget):
+    """A DAV widget for text values."""
+
+class ISequenceDAVWidget(IDAVWidget):
+    """A DAV widget for sequences."""
 


=== Zope3/src/zope/app/interfaces/form.py 1.10 => 1.10.4.1 ===
--- Zope3/src/zope/app/interfaces/form.py:1.10	Tue Feb 24 09:19:07 2004
+++ Zope3/src/zope/app/interfaces/form.py	Thu Feb 26 00:10:56 2004
@@ -84,18 +84,45 @@
 class IWidget(IView):
     """Generically describes the behavior of a widget.
 
-    The widget defines a list of propertyNames, which describes
-    what properties of the widget are available to use for
-    constructing the widget render output.
-
     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.""")
 
-    def getValue(name):
-        """Look up a Widget configuration setting by name."""
+    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.""")
+       
+    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.
@@ -125,7 +152,6 @@
         See validate() for validation performed.
         """
 
-
     def hasInput():
         """Returns True if the widget has input.
 
@@ -149,29 +175,5 @@
         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