changeset 61:f983d5ce6402

Display human readable strings of the selected values in the UI. flys-client/trunk@1526 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 21 Mar 2011 09:21:01 +0000
parents f793d35bfb08
children faf565d22c9a
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java
diffstat 3 files changed, 13 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Mon Mar 21 08:28:02 2011 +0000
+++ b/flys-client/ChangeLog	Mon Mar 21 09:21:01 2011 +0000
@@ -1,3 +1,12 @@
+2011-03-21  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java:
+	  Parse the selected values as human readable strings from the static UI
+	  part.
+
+	* src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java:
+	  Display human readable values in the static UI part.
+
 2011-03-21  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/event/HasStepBackHandlers.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java	Mon Mar 21 08:28:02 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/SelectProvider.java	Mon Mar 21 09:21:01 2011 +0000
@@ -76,7 +76,7 @@
                 HLayout hLayout = new HLayout();
 
                 hLayout.addMember(label);
-                hLayout.addMember(new Label(item.getStringValue()));
+                hLayout.addMember(new Label(item.getLabel()));
 
                 vLayout.addMember(hLayout);
             }
--- a/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java	Mon Mar 21 08:28:02 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/ArtifactDescriptionFactory.java	Mon Mar 21 09:21:01 2011 +0000
@@ -244,9 +244,10 @@
 
             String value = XMLUtils.xpathString(
                 tmp, "@art:value", ArtifactNamespaceContext.INSTANCE);
+            String label = XMLUtils.xpathString(
+                tmp, "@art:label", ArtifactNamespaceContext.INSTANCE);
 
-            // TODO extract the human readable value (description) from node
-            items[i] = new DefaultDataItem(value, value, value);
+            items[i] = new DefaultDataItem(label, label, value);
         }
 
         return items;

http://dive4elements.wald.intevation.org