# HG changeset patch # User Ingo Weinzierl # Date 1267459239 0 # Node ID 154d158238d31b986375b285d296e4ae24407940 # Parent 22cc12b1622cb24e5b5d5e5b91c64a3282ece05b Display the selected value if there is no description avaible. WKT-strings will be displayed again (issue182). gnv-artifacts/trunk@720 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 22cc12b1622c -r 154d158238d3 gnv-artifacts/ChangeLog --- a/gnv-artifacts/ChangeLog Mon Mar 01 14:15:33 2010 +0000 +++ b/gnv-artifacts/ChangeLog Mon Mar 01 16:00:39 2010 +0000 @@ -1,3 +1,11 @@ +2010-03-01 Ingo Weinzierl + + Issue182 + + * src/main/java/de/intevation/gnv/state/StateBase.java: Display the selected + value if there is no description available. WKT-strings will be displayed + in the static ui part again. + 2010-03-01 Ingo Weinzierl Issue179 diff -r 22cc12b1622c -r 154d158238d3 gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java --- a/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java Mon Mar 01 14:15:33 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/state/StateBase.java Mon Mar 01 16:00:39 2010 +0000 @@ -714,15 +714,18 @@ for (int i = 0; i < size; i++) { Element itemNode = creator.create("item"); + String value = data.getValue(); + String desc = descriptions[i]; + desc = desc == null ? value : desc; creator.addAttr(itemNode, "selected", "true"); Element choiceLableNode = creator.create("label"); - choiceLableNode.setTextContent(descriptions[i]); + choiceLableNode.setTextContent(desc); itemNode.appendChild(choiceLableNode); Element choiceValueNode = creator.create("value"); - choiceValueNode.setTextContent(data.getValue()); + choiceValueNode.setTextContent(value); itemNode.appendChild(choiceValueNode); choiceNode.appendChild(itemNode); }