commit-gnue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

r5851 - trunk/gnue-forms/src


From: jcater
Subject: r5851 - trunk/gnue-forms/src
Date: Mon, 31 May 2004 23:45:27 -0500 (CDT)

Author: jcater
Date: 2004-05-31 23:45:26 -0500 (Mon, 31 May 2004)
New Revision: 5851

Modified:
   trunk/gnue-forms/src/GFConfig.py
   trunk/gnue-forms/src/GFForm.py
   trunk/gnue-forms/src/GFParser.py
Log:
added support for block.autoClear, which clears all records from cache after a 
commit

Modified: trunk/gnue-forms/src/GFConfig.py
===================================================================
--- trunk/gnue-forms/src/GFConfig.py    2004-05-31 20:47:27 UTC (rev 5850)
+++ trunk/gnue-forms/src/GFConfig.py    2004-06-01 04:45:26 UTC (rev 5851)
@@ -32,12 +32,12 @@
 from gnue.common.formatting import GTypecast
 
 ConfigOptions = (
-  { 'Name'       : 'AutoCreate',
-    'Type'       : 'Setting',
-    'Comment'    : 'Create new records in blocks automagically when you hit 
the bottom',
-    'Description': 'Create new records in blocks automagically when you hit 
the bottom.',
-    'Typecast'   : GTypecast.boolean,
-    'Default'    : True },
+#   { 'Name'       : 'AutoCreate',
+#     'Type'       : 'Setting',
+#     'Comment'    : 'Create new records in blocks automagically when you hit 
the bottom',
+#     'Description': 'Create new records in blocks automagically when you hit 
the bottom.',
+#     'Typecast'   : GTypecast.boolean,
+#     'Default'    : True },
 
   { 'Name'       : 'RememberLastQuery',
     'Type'       : 'Setting',

Modified: trunk/gnue-forms/src/GFForm.py
===================================================================
--- trunk/gnue-forms/src/GFForm.py      2004-05-31 20:47:27 UTC (rev 5850)
+++ trunk/gnue-forms/src/GFForm.py      2004-06-01 04:45:26 UTC (rev 5851)
@@ -550,6 +550,9 @@
           block.processTrigger('Post-Commit')
 
         for block in self._logic._blockList:
+          if block.autoClear:
+            block.processClear()
+          else:
             block.switchRecord(0)
 
         self.dispatchEvent('cannotCOMMIT')

Modified: trunk/gnue-forms/src/GFParser.py
===================================================================
--- trunk/gnue-forms/src/GFParser.py    2004-05-31 20:47:27 UTC (rev 5850)
+++ trunk/gnue-forms/src/GFParser.py    2004-06-01 04:45:26 UTC (rev 5851)
@@ -229,10 +229,13 @@
                'Default': False,
                'Description': 'If set, then the datasource will automatically '
                               'commit changes when trying to navigate out of 
the '
-                              'current record. If {field}, then a commit 
happens each time a '
-                              'field changes. Care should be taken when 
{field} is '
-                              ' specified as forms could try to commit before 
a new '
-                              'record is committable.'},
+                              'current record.'},
+            'autoClear':{
+               'Typecast': GTypecast.boolean,
+               'Label': _('Auto Clear on Commit'),
+               'Default': False,
+               'Description': 'If set, then the block is cleared/emptied on '
+                              'a commit.'},
             'editable': {
                'Description': 'Can records be edited/created?',
                'Label': _('Allow Editing'),





reply via email to

[Prev in Thread] Current Thread [Next in Thread]