[Zope3-checkins] CVS: Zope3/src/zope/app/form/browser - interfaces.py:1.4

Garrett Smith garrett at mojave-corp.com
Fri May 7 15:39:46 EDT 2004


Update of /cvs-repository/Zope3/src/zope/app/form/browser
In directory cvs.zope.org:/tmp/cvs-serv31185/src/zope/app/form/browser

Modified Files:
	interfaces.py 
Log Message:
Deleted label and row methods from browser widget.


=== Zope3/src/zope/app/form/browser/interfaces.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/form/browser/interfaces.py:1.3	Sat Apr 24 19:19:42 2004
+++ Zope3/src/zope/app/form/browser/interfaces.py	Fri May  7 15:39:44 2004
@@ -18,7 +18,7 @@
 from zope.app.form.interfaces import IWidget
 
 class IAddFormCustomization(Interface):
-    """This interface defined methods of add forms that can be overridden
+    """API for add form customization.
 
     Classes supplied when defining add forms may need to override some
     of these methods.
@@ -39,7 +39,6 @@
         content = <create the content from the data>
         content = self.add(content) # content wrapped in some context
         <set after-add attributes on content>
-
     """
 
     def createAndAdd(data):
@@ -54,7 +53,7 @@
         """
 
     def add(content):
-        """Add the given content
+        """Add the given content.
 
         This method is overridden when the context of the add form is
         not an IAdding.  In this case, the class that customizes the
@@ -76,40 +75,22 @@
         i.e. it delegates to the IAdding view.
         """
 
-
 class IBrowserWidget(IWidget):
-    """A field widget contains all the properties that are required
-       to represent a field. Properties include css_sheet,
-       default value and so on.
-    """
+    """A widget for use in a web browser UI."""
 
-    def __call__(): # XXX promote to IWidget?
-        """Render the widget
-        """
+    def __call__():
+        """Render the widget."""
 
     def hidden():
-        """Render the widget as a hidden field
-        """
-
-    def label():
-        """Render a label tag"""
+        """Render the widget as a hidden field."""
 
-    def error(): # XXX promote to IWidget?
+    def error():
         """Render the validation error for the widget, or return
         an empty string if no error"""
 
-    def row():
-        """Render the widget as two or three div elements,
-           for the label, the field and possibly the validation error
-
-        For example:
-          <div class="label">label</div><div class="field">field</div>
-          <div class="error">Validation error message</div>
-        """
-
 
 class IFormCollaborationView(Interface):
-    """Views that collaborate to create a single form
+    """Views that collaborate to create a single form.
 
     When a form is applied, the changes in the form need to
     be applied to individual views, which update objects as
@@ -134,8 +115,7 @@
         """
 
     def update():
-        """Update the form with data from the request.
-        """
+        """Update the form with data from the request."""
 
 
 class IVocabularyQueryView(Interface):




More information about the Zope3-Checkins mailing list