comparison src/java/de/intevation/mxd/reader/UniqueValueRendererReader.java @ 185:415101ff1ac2

Remove whitespaces from unique values string only if it is a concatenation of multiple values.
author raimund renkert <raimund.renkert@intevation.de>
date Wed, 20 Jul 2011 12:32:08 +0200
parents 0bde090506f9
children df4e0946ef02
comparison
equal deleted inserted replaced
184:c79c3c6fc99a 185:415101ff1ac2
89 for(int i = 0; i < count; i++) { 89 for(int i = 0; i < count; i++) {
90 Element rendererElement = util.addRenderer(layer); 90 Element rendererElement = util.addRenderer(layer);
91 91
92 try { 92 try {
93 String value = renderer.getValue(i); 93 String value = renderer.getValue(i);
94 value = value.replaceAll(" ", ""); 94 value = value.replaceAll(", ", ",");
95 if(value.indexOf(",") > 0) { 95 if(value.indexOf(",") > 0) {
96 int j = 0; 96 int j = 0;
97 while(value.indexOf(",") > 0) { 97 while(value.indexOf(",") > 0) {
98 String v = value.substring(0, value.indexOf(",")); 98 String v = value.substring(0, value.indexOf(","));
99 rendererElement.setAttribute("value_" + j, v); 99 rendererElement.setAttribute("value_" + j, v);
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)