[Dive4elements-commits] [PATCH] Datacage: Removed 'filter' attribute from <dc:for-each> because there is the <dc:filter> element now

Wald Commits scm-commit at wald.intevation.org
Mon Apr 1 13:51:20 CEST 2013


# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1364817056 -7200
# Node ID fcf28185ca30c699c195b03d3fd374033f67feb8
# Parent  3badc699af0e122f2f09d345d951201d18b408ab
Datacage: Removed 'filter' attribute from <dc:for-each> because there is the <dc:filter> element now.

diff -r 3badc699af0e -r fcf28185ca30 flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java	Mon Apr 01 13:36:14 2013 +0200
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java	Mon Apr 01 13:50:56 2013 +0200
@@ -329,16 +329,10 @@
             log.debug("dc:for-each");
 
             if (connectionsStack.isEmpty()) {
-                log.warn("dc:for-each without having results");
+                log.debug("dc:for-each without having results");
                 return;
             }
 
-            String filter = current.getAttribute("filter");
-
-            if ((filter = filter.trim()).length() == 0) {
-                filter = null;
-            }
-
             NodeList subs = current.getChildNodes();
             int S = subs.getLength();
 
@@ -351,33 +345,20 @@
                 connectionsStack.peek();
 
             ResultData rd = pair.getB();
-            ResultData orig = rd;
 
-            if (filter != null) {
-                ResultData rdCopy = createFilteredResultData(rd, filter);
-                pair.setB(rdCopy);
-                rd = rdCopy;
-            }
-            try {
-                String [] columns = rd.getColumnLabels();
+            String [] columns = rd.getColumnLabels();
 
-                for (Object [] row: rd.getRows()) {
-                    frames.enter();
-                    try {
-                        frames.put(columns, row);
-                        for (int i = 0; i < S; ++i) {
-                            build(parent, subs.item(i));
-                        }
-                    }
-                    finally {
-                        frames.leave();
+            for (Object [] row: rd.getRows()) {
+                frames.enter();
+                try {
+                    frames.put(columns, row);
+                    for (int i = 0; i < S; ++i) {
+                        build(parent, subs.item(i));
                     }
                 }
-            }
-            finally {
-                 if (filter != null) {
-                     pair.setB(orig);
-                 }
+                finally {
+                    frames.leave();
+                }
             }
         }
 


More information about the Dive4elements-commits mailing list