Mercurial > dive4elements > river
changeset 6092:bdb316f7c552
Datacage: Fixed addColumn in <dc:virtual-column>
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Fri, 24 May 2013 18:13:23 +0200 (2013-05-24) |
parents | 75a38bc6baf2 |
children | 4b634935a2ad |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java |
diffstat | 1 files changed, 7 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java Fri May 24 13:57:40 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/datacage/templating/Builder.java Fri May 24 18:13:23 2013 +0200 @@ -517,6 +517,7 @@ String [] origColumns = rd.getColumnLabels(); int index = origColumns.length; String [] newColumns = Arrays.copyOf(origColumns, index+1); + newColumns[index] = name.toLowerCase(); ResultData result = new ResultData(newColumns); fillResult(result, rd, index, index+1, expr, returnType); return result; @@ -535,17 +536,15 @@ } protected void fillResult( - ResultData result, - ResultData rd, - int index, - int size, + ResultData result, + ResultData rd, + int index, + int size, XPathExpression expr, - QName returnType + QName returnType ) { - List<Object []> rows = rd.getRows(); String [] origColumns = rd.getColumnLabels(); - for (int i = 0, R = rows.size(); i < R; ++i) { - Object [] row = rows.get(i); + for (Object [] row: rd.getRows()) { frames.enter(); try { frames.put(origColumns, row);