Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/AbstractUIProvider.java @ 873:77a549772aa9
Query MapInfo object for correct river (was hard coded).
flys-client/trunk@2694 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 12 Sep 2011 05:40:58 +0000 |
parents | dfbc6693247e |
children | 794d1af42987 |
comparison
equal
deleted
inserted
replaced
872:a7179e3a774e | 873:77a549772aa9 |
---|---|
22 import de.intevation.flys.client.client.event.StepForwardHandler; | 22 import de.intevation.flys.client.client.event.StepForwardHandler; |
23 import de.intevation.flys.client.shared.model.Data; | 23 import de.intevation.flys.client.shared.model.Data; |
24 import de.intevation.flys.client.shared.model.DataItem; | 24 import de.intevation.flys.client.shared.model.DataItem; |
25 import de.intevation.flys.client.shared.model.DataList; | 25 import de.intevation.flys.client.shared.model.DataList; |
26 import de.intevation.flys.client.shared.model.Artifact; | 26 import de.intevation.flys.client.shared.model.Artifact; |
27 import de.intevation.flys.client.shared.model.ArtifactDescription; | |
27 | 28 |
28 /** | 29 /** |
29 * An abstract UIProvider that provides some basic methods. | 30 * An abstract UIProvider that provides some basic methods. |
30 * | 31 * |
31 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> | 32 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a> |
208 } | 209 } |
209 | 210 |
210 return null; | 211 return null; |
211 } | 212 } |
212 | 213 |
214 | |
215 protected String getDataValue(String state, String name) { | |
216 ArtifactDescription desc = artifact.getArtifactDescription(); | |
217 | |
218 DataList[] old = desc.getOldData(); | |
219 | |
220 for (DataList list: old) { | |
221 Data d = getData(list.getAll(), name); | |
222 | |
223 if (d != null) { | |
224 return d.getItems()[0].getStringValue(); | |
225 } | |
226 } | |
227 | |
228 return null; | |
229 } | |
230 | |
213 /** | 231 /** |
214 * This method greps the DataItem with name <i>name</i> from the list and | 232 * This method greps the DataItem with name <i>name</i> from the list and |
215 * returns it. | 233 * returns it. |
216 * | 234 * |
217 * @param items A list of DataItems. | 235 * @param items A list of DataItems. |