Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/SedLoadEpochPanel.java @ 8230:f54c4b858213
(issue1448) Extend SedimentLoadInfo request to handle sq time intervals
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Mon, 08 Sep 2014 16:23:38 +0200 |
parents | 9b092c960455 |
children | c0da2514f4ce |
comparison
equal
deleted
inserted
replaced
8229:0bf888783683 | 8230:f54c4b858213 |
---|---|
251 DataList[] data = adescr.getOldData(); | 251 DataList[] data = adescr.getOldData(); |
252 | 252 |
253 double[] km = artifact.getArtifactDescription().getKMRange(); | 253 double[] km = artifact.getArtifactDescription().getKMRange(); |
254 String river = artifact.getArtifactDescription().getRiver(); | 254 String river = artifact.getArtifactDescription().getRiver(); |
255 | 255 |
256 sedLoadInfoService.getSedimentLoadInfo(locale, river, "single", km[0], km[1], | 256 String sq_ti_id = ""; |
257 if (data.length > 0) { | |
258 Data str = getData(data[0].getAll(), "sq_ti_id"); | |
259 if (str != null) { | |
260 DataItem[] strItems = str.getItems(); | |
261 sq_ti_id = strItems[0].getStringValue(); | |
262 } else { | |
263 GWT.log("Failed to find sq time interval id in data."); | |
264 } | |
265 } | |
266 | |
267 sedLoadInfoService.getSedimentLoadInfo(locale, river, "single", km[0], km[1], sq_ti_id, | |
257 new AsyncCallback<SedimentLoadInfoObject[]>() { | 268 new AsyncCallback<SedimentLoadInfoObject[]>() { |
258 public void onFailure(Throwable caught) { | 269 public void onFailure(Throwable caught) { |
259 GWT.log("Could not recieve sediment load informations."); | 270 GWT.log("Could not recieve sediment load informations."); |
260 SC.warn(caught.getMessage()); | 271 SC.warn(caught.getMessage()); |
261 } | 272 } |