changeset 2708:282db12a5bdf

Adapted the dynamic DESCRIBE creation of MultiIntArrayState to be able to use default mechanisms in FLYS client. flys-artifacts/trunk@4430 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 16 May 2012 14:56:28 +0000
parents d6e32ae72da6
children cd6bcca17de6
files flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/MultiIntArrayState.java
diffstat 2 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Wed May 16 13:02:40 2012 +0000
+++ b/flys-artifacts/ChangeLog	Wed May 16 14:56:28 2012 +0000
@@ -1,3 +1,10 @@
+2012-05-16  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/artifacts/states/MultiIntArrayState.java:
+	  Do not add a <art:choices> element to the dynamic DESCRIBE but add the
+	  <art:item> directly to <art:select> which allows using default mechanism
+	  in FLYS client.
+
 2012-05-15	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	* src/main/java/de/intevation/flys/artifacts/model/FixingsOverview.java:
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/MultiIntArrayState.java	Wed May 16 13:02:40 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/MultiIntArrayState.java	Wed May 16 14:56:28 2012 +0000
@@ -37,17 +37,13 @@
         try {
             creator.addAttr(select, "type", "intoptions", true);
 
-            Element  choices = creator.create("choices");
-
             for (KVP kvp: getOptions(artifact, name)) {
                 Element item = creator.create("item");
                 creator.addAttr(item, "label", kvp.getValue().toString(), true);
-                item.setTextContent(kvp.getKey().toString());
+                creator.addAttr(item, "value", kvp.getKey().toString(), true);
 
-                choices.appendChild(item);
+                select.appendChild(item);
             }
-
-            select.appendChild(choices);
         }
         catch (IllegalArgumentException iae) {
             logger.warn("Illegal argument", iae);

http://dive4elements.wald.intevation.org