Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterMultipleLocationsState.java @ 3468:f37e7e8907cb
merged flys-artifacts/2.8.1
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:14:39 +0200 |
parents | 5642a83420f2 |
children | 33bfc01410fb |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/states/EnterMultipleLocationsState.java Fri Sep 28 12:14:39 2012 +0200 @@ -0,0 +1,35 @@ +package de.intevation.flys.artifacts.states; + +import de.intevation.artifacts.CallContext; +import de.intevation.artifacts.common.utils.StringUtils; + + +/** + * Get me doubles (km). + */ +public class EnterMultipleLocationsState extends EnterLocationState { + + @Override + protected String getUIProvider() { + return "multi_location_panel"; + } + + + /** Deal with multiple double values. */ + @Override + protected String getLabelFor( + CallContext cc, + String name, + String value, + String type + ) { + String label = ""; + String[] vals = value.split(" "); + for (int i = 0; i < vals.length; i++) { + vals[i] = super.getLabelFor(cc, name, vals[i], type); + } + + return StringUtils.join(" ", vals); + } +} +// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :