Mercurial > dive4elements > river
changeset 1260:3a4c14b4a8f1
DemDatacagePanel now returns the database ID of the selected DEM.
flys-client/trunk@2788 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 19 Sep 2011 15:04:08 +0000 |
parents | a1a5dc2b9e34 |
children | 87b6a93db523 |
files | flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/DemDatacagePanel.java |
diffstat | 2 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-client/ChangeLog Fri Sep 16 13:24:36 2011 +0000 +++ b/flys-client/ChangeLog Mon Sep 19 15:04:08 2011 +0000 @@ -1,3 +1,9 @@ +2011-09-19 Ingo Weinzierl <ingo@intevation.de> + + * src/main/java/de/intevation/flys/client/client/ui/DemDatacagePanel.java: + Display datacage panel with DEMs only. Return Data object with selected + database ID after pushing 'next' button. + 2011-09-16 Ingo Weinzierl <ingo@intevation.de> * src/main/java/de/intevation/flys/client/server/MetaDataServiceImpl.java,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/DemDatacagePanel.java Fri Sep 16 13:24:36 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/DemDatacagePanel.java Mon Sep 19 15:04:08 2011 +0000 @@ -1,9 +1,13 @@ package de.intevation.flys.client.client.ui; +import java.util.List; + import de.intevation.flys.client.shared.model.Data; import de.intevation.flys.client.shared.model.DataItem; import de.intevation.flys.client.shared.model.DefaultData; import de.intevation.flys.client.shared.model.DefaultDataItem; +import de.intevation.flys.client.shared.model.Recommendation; +import de.intevation.flys.client.shared.model.ToLoad; import de.intevation.flys.client.shared.model.User; @@ -43,10 +47,19 @@ @Override protected Data[] getData() { - String value = "TODO:FIND VALUE"; - DataItem item = new DefaultDataItem(dataName, dataName, value); + Recommendation r = getSelectedRecommendation(); + + DataItem item = new DefaultDataItem(dataName, dataName, r.getIDs()); return new Data[] { new DefaultData( dataName, null, null, new DataItem[] { item }) }; } + + + protected Recommendation getSelectedRecommendation() { + ToLoad toLoad = widget.getSelection(); + List<Recommendation> recoms = toLoad.toRecommendations(); + + return recoms.get(0); + } } // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :