[Mpuls-commits] r400 - in wasko/trunk: . waskaweb/lib

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Mar 18 15:04:04 CET 2009


Author: teichmann
Date: 2009-03-18 15:03:53 +0100 (Wed, 18 Mar 2009)
New Revision: 400

Modified:
   wasko/trunk/ChangeLog.txt
   wasko/trunk/waskaweb/lib/renderer.py
Log:
Handle Conditional in renderer correctly. TODO: Solve layout problems.


Modified: wasko/trunk/ChangeLog.txt
===================================================================
--- wasko/trunk/ChangeLog.txt	2009-03-18 13:23:02 UTC (rev 399)
+++ wasko/trunk/ChangeLog.txt	2009-03-18 14:03:53 UTC (rev 400)
@@ -1,3 +1,8 @@
+2009-03-18	Sascha L. Teichmann <teichmann at intevation.de>
+
+	* waskaweb/lib/renderer.py: Handle conditionals correctly. TODO:
+	  Solve layout issues.
+
 2009-03-18	Torsten Irlaender  <torsten.irlaender at intevation.de> 
 
 	Fixed coping of casedata

Modified: wasko/trunk/waskaweb/lib/renderer.py
===================================================================
--- wasko/trunk/waskaweb/lib/renderer.py	2009-03-18 13:23:02 UTC (rev 399)
+++ wasko/trunk/waskaweb/lib/renderer.py	2009-03-18 14:03:53 UTC (rev 400)
@@ -369,19 +369,22 @@
         self.toTarget(Item("".join(out)), node.getTarget())
 
     def _renderConditional(self, conditional):
+
         expr = conditional.getExpr()
-
+        out = u""
         if expr and not self.formdata.evaluate(expr):
             ro = not conditional.isInvisible()
             if ro:
                 old_ro = self.ro_mode
                 self.ro_mode = True
-                self._renderRecursive(conditional)
+                out = self._renderRecursive(conditional)
                 self.ro_mode = old_ro
         else:
-            self._renderRecursive(conditional)
+            out = self._renderRecursive(conditional)
 
+        self.toTarget(Text(out), conditional.getTarget())
 
+
     def _renderMatrix(self, node):
         description = node.getDescription()
         name        = node.getName()



More information about the Mpuls-commits mailing list