Mercurial > dive4elements > river
changeset 5525:fcf28185ca30
Datacage: Removed 'filter' attribute from <dc:for-each> because there is the <dc:filter> element now.
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Mon, 01 Apr 2013 13:50:56 +0200 |
parents | 3badc699af0e |
children | 33d735f5433e |
files | flys-artifacts/src/main/java/de/intevation/flys/artifacts/datacage/templating/Builder.java |
diffstat | 1 files changed, 12 insertions(+), 31 deletions(-) [+] |
line wrap: on
line diff
--- 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(); - 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(); + 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 { - if (filter != null) { - pair.setB(orig); - } + finally { + frames.leave(); + } } }