# HG changeset patch # User Tim Englich # Date 1255959216 0 # Node ID 63f65fb9f2106f01b6070c21b2db63747b50de2e # Parent 00c1a931b9c3f79a8597d0a6778549e1d7c03e42 Added uniform Visualization of Single Input-Elements to MinMax-Elements. issue55 gnv-artifacts/trunk@247 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 00c1a931b9c3 -r 63f65fb9f210 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Mon Oct 19 12:18:08 2009 +0000 +++ b/gnv-artifacts/ChangeLog Mon Oct 19 13:33:36 2009 +0000 @@ -1,5 +1,9 @@ 2009-10-19 Tim Englich + * src/main/java/de/intevation/gnv/transition/TransitionBase.java (describe): + Added uniform Visualization of Single Input-Elements to MinMax-Elements. issue55 + +2009-10-19 Tim Englich * src/main/java/de/intevation/gnv/artifacts/GNVArtifactBase.java (feed): Catch Exception that the Calling Program could not put no InputData into the feed Request.issue56 diff -r 00c1a931b9c3 -r 63f65fb9f210 gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java Mon Oct 19 12:18:08 2009 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java Mon Oct 19 13:33:36 2009 +0000 @@ -577,6 +577,18 @@ } else if (o instanceof SingleValueDescribeData) { SingleValueDescribeData svdb = (SingleValueDescribeData) o; + + Element groupNode = xmlutilities.createXFormElement( + document, "group"); + groupNode.setAttribute("ref", svdb.getName()); + Element groupNodeLableNode = xmlutilities + .createXFormElement(document, "label"); + groupNodeLableNode.setTextContent(RessourceFactory + .getInstance().getRessource( + callMeta.getLanguages(), + svdb.getName(), + svdb.getName())); + groupNode.appendChild(groupNodeLableNode); Element inputNode = xmlutilities.createXFormElement( document, "input"); @@ -584,10 +596,7 @@ Element inputLableNode = xmlutilities.createXFormElement( document, "label"); - inputLableNode.setTextContent(RessourceFactory - .getInstance().getRessource( - callMeta.getLanguages(), svdb.getName(), - svdb.getName())); + inputLableNode.setTextContent(""); inputNode.appendChild(inputLableNode); Element inputValueNode = xmlutilities.createXFormElement( @@ -595,10 +604,11 @@ inputValueNode.setTextContent(svdb.getValue()); inputNode.appendChild(inputValueNode); + groupNode.appendChild(inputNode); if (!it.hasNext()) { - dynamic.appendChild(inputNode); + dynamic.appendChild(groupNode); } else { - staticNode.appendChild(inputNode); + staticNode.appendChild(groupNode); } }