[Zope3-checkins] CVS: Zope3/doc/zcml/namespaces.zope.org/browser - addform.stx:1.2 editform.stx:1.2

Jim Fulton jim@zope.com
Fri, 21 Mar 2003 15:55:40 -0500


Update of /cvs-repository/Zope3/doc/zcml/namespaces.zope.org/browser
In directory cvs.zope.org:/tmp/cvs-serv17922/doc/zcml/namespaces.zope.org/browser

Modified Files:
	addform.stx editform.stx 
Log Message:
  Created addform documentation.
  Updated editform documentation.



=== Zope3/doc/zcml/namespaces.zope.org/browser/addform.stx 1.1 => 1.2 ===
--- Zope3/doc/zcml/namespaces.zope.org/browser/addform.stx:1.1	Tue Dec 31 13:26:48 2002
+++ Zope3/doc/zcml/namespaces.zope.org/browser/addform.stx	Fri Mar 21 15:55:39 2003
@@ -1,4 +1,117 @@
-addform (function zope.app.browser.form.add)
+ZCML addform directive
+
+  Define an automatically generated add form
+  
+  The addForm directive creates and register's a view for
+  adding an object based on a schema.
+  
+  Adding an object is a bit trickier than editing an object,
+  because the object the schema applies to isn't available when
+  forms are being rendered.  The addForm directive provides an
+  customization interface to overcome this difficulty.
+  
+  See zope.app.interfaces.browser.form.IAddFormCustomization.
 
   Attributes
+
+    layer -- (optional) 
+
+      The layer the view is in.
+      
+      A skin is composed of layers. It is common to put skin specific
+      views in a layer named after the skin. If the 'layer' attribute
+      is not supplied, it defaults to 'default'.
+
+    name -- (required) 
+
+      The name of the generated add view.
+
+    for -- (optional) 
+
+      The interface this page (view) applies to.
+      
+      The view will be for all objects that implement this interface.
+      
+      zope.app.interfaces.container.IAdding is used if this
+      attribute isn't specified.  If this attribute is specified,
+      then either the named interface must extend IAdding or a class
+      attribute must be used to supply a class implements certain
+      methods described in
+      zope.app.interfaces.browser.form.IAddFormCustomization.
+      
+      The schema is used if the for attribute is not specified.
+      
+      If the for attribute is specified, then the objects views must
+      implement or be adaptable to the schema.
+
+    permission -- (required) 
+
+      The permission needed to use the view.
+
+    menu -- (optional) 
+
+      The browser menu to include the edit form in.
+      
+      Many views are included in menus. It's convenient to name
+      the menu in the page directive, rather than having to give a
+      separate menuItem directive.
+
+    title -- (optional) 
+
+      The browser menu label for the edit form
+      
+      This attribute defaults to "Edit".
+
+    content_factory -- (optional) 
+
+      The dotted name of an object to call to create new content objects.
+      
+      This attribute isn't used if a class is specified that
+      implements createAndAdd.
+
+    keyword_arguments -- (optional) 
+
+      A list of field names to supply as keyword arguments to
+      the factory.
+
+    set_after_add -- (optional) 
+
+      A list of fields to be assigned to the newly created object
+      after it is added.
+
+    set_before_add -- (optional) 
+
+      A list of fields to be assigned to the newly created object
+      before it is added.
+
+    arguments -- (optional) 
+
+      A list of field names to supply as positional arguments to
+      the factory.
+
+    template -- (optional) 
+
+      An alternate template to use for the edit form.
+      
+      XXX Need to document how to extend the default.
+
+    label -- (optional) 
+
+      A label to be used as the heading for the form.
+
+    class -- (optional) 
+
+      A class to provide custom widget definitions or methods to be
+      used by a custom template.
+      
+      This class can override methods defined in IAddFormCustomization.
+      
+      This class is used as a mix-in class. As a result, it needn't
+      subclass any special classes, such as BrowserView.
+
+    schema -- (required) 
+
+      The schema from which the add form is generated.
+      
+      A schema is an interface that includes fields.
 


=== Zope3/doc/zcml/namespaces.zope.org/browser/editform.stx 1.1 => 1.2 ===
--- Zope3/doc/zcml/namespaces.zope.org/browser/editform.stx:1.1	Tue Dec 31 13:26:48 2002
+++ Zope3/doc/zcml/namespaces.zope.org/browser/editform.stx	Fri Mar 21 15:55:39 2003
@@ -1,6 +1,9 @@
-editform (function edit)
-
+ZCML editform directive
 
+  Define an automatically generated edit form
+  
+  The editForm directive creates and register's a view for
+  editing an object based on a schema.
 
   Attributes
 
@@ -10,8 +13,7 @@
       
       A skin is composed of layers. It is common to put skin specific
       views in a layer named after the skin. If the 'layer' attribute
-      is not supplied, it defaults to
-      'default'.
+      is not supplied, it defaults to 'default'.
 
     title -- (optional) 
 
@@ -27,17 +29,16 @@
 
       The interface this page (view) applies to.
       
-      The view will be for all objects that implement this
+      The view will be for all objects that implement this interface.
       
       The schema is used if the for attribute is not specified.
-      interface. If the for attribute is specified, the given
-      interface must extend the schema.
+      
+      If the for attribute is specified, then the objects views must
+      implement or be adaptable to the schema.
 
     permission -- (required) 
 
       The permission needed to use the view.
-      
-      This attribute is required.
 
     menu -- (optional) 
 
@@ -49,14 +50,17 @@
 
     schema -- (required) 
 
-      The schema from which the edir form is generated.
+      The schema from which the edit form is generated.
       
       A schema is an interface that includes fields.
 
     class -- (optional) 
 
-      A class to provide custom widget defineitions or methods to be
+      A class to provide custom widget definitions or methods to be
       used by a custom template.
+      
+      This class is used as a mix-in class. As a result, it needn't
+      subclass any special classes, such as BrowserView.
 
     template -- (optional) 
 
@@ -64,7 +68,7 @@
       
       XXX Need to document how to extend the default.
 
-    label -- (required) 
+    label -- (optional) 
 
       A label to be used as the heading for the form.