changeset 195:63f65fb9f210

Added uniform Visualization of Single Input-Elements to MinMax-Elements. issue55 gnv-artifacts/trunk@247 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 19 Oct 2009 13:33:36 +0000
parents 00c1a931b9c3
children 60c61f323f16
files gnv-artifacts/ChangeLog gnv-artifacts/src/main/java/de/intevation/gnv/transition/TransitionBase.java
diffstat 2 files changed, 20 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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  <tim.englich@intevation.de>
 
+	* 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  <tim.englich@intevation.de>
 	* 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 
--- 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);
                     }
                 }
 

http://dive4elements.wald.intevation.org