[Checkins] SVN: zope3org/trunk/src/zorg/multiform/gridform.txt

Stefan Martin s.martin at iwm-kmrc.de
Tue Apr 11 05:35:09 EDT 2006


Log message for revision 66841:
  

Changed:
  U   zope3org/trunk/src/zorg/multiform/gridform.txt

-=-
Modified: zope3org/trunk/src/zorg/multiform/gridform.txt
===================================================================
--- zope3org/trunk/src/zorg/multiform/gridform.txt	2006-04-11 09:32:46 UTC (rev 66840)
+++ zope3org/trunk/src/zorg/multiform/gridform.txt	2006-04-11 09:35:09 UTC (rev 66841)
@@ -46,15 +46,7 @@
     ...         return False
     ...     return ISelection(form.context).selected
     
-    >>> def isSubFormInputMode(form,action):
-    ...     return form.inputMode
-    
-    >>> def isSubFormDisplayMode(form,action):
-    ...     return not form.inputMode
 
-    >>> def anySubFormDisplayMode(form,action):
-    ...     return not (True in form.parentForm.subFormInputMode.values())
-
     >>> class OrderForm(gridform.GridItemFormBase):
     ...     inputMode=False
     ...     forceInput=['selected'] 
@@ -73,20 +65,20 @@
     ...         self.newInputMode = False
     ...         
     ...     @multiform.parentAction('Edit',
-    ...         condition=anySubFormDisplayMode)
+    ...         condition=multiform.allSubFormsDisplayMode)
     ...     def handle_edit_action(self, action, data):
     ...         if isSelected(self,action):
     ...             self.newInputMode = True
     ...
     ...     @multiform.itemAction(u"SingleSave",
-    ...         condition=isSubFormInputMode,inputMode=True)
+    ...         condition=multiform.isFormInputMode,inputMode=True)
     ...     def handle_singlesave_action(self, action, data):
     ...         form.applyChanges(self.context, self.form_fields,
     ...         data, self.adapters)
     ...         self.newInputMode = False
     ...         
     ...     @multiform.itemAction('SingleEdit',
-    ...         condition=isSubFormDisplayMode)
+    ...         condition=multiform.isFormDisplayMode)
     ...     def handle_singleedit_action(self, action, data):
     ...         self.newInputMode = True
 



More information about the Checkins mailing list