changeset 242:f9ca49e59fb6

Fixed the single location input panel. flys-client/trunk@1821 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 04 May 2011 13:02:00 +0000 (2011-05-04)
parents 764488577cc8
children 11c5bcd349b1
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Wed May 04 08:41:55 2011 +0000
+++ b/flys-client/ChangeLog	Wed May 04 13:02:00 2011 +0000
@@ -1,3 +1,9 @@
+2011-05-04  Raimund Renkert <rrenkert@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java:
+	  Fixed the input panel. It takes manual input now and the table data is
+	  filtered correctly.
+
 2011-05-04  Ingo Weinzierl <ingo@intevation.de>
 
 	* src/main/java/de/intevation/flys/client/client/FLYSConstants.properties,
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java	Wed May 04 08:41:55 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/SingleLocationPanel.java	Wed May 04 13:02:00 2011 +0000
@@ -148,6 +148,8 @@
 
     public Canvas createOld(DataList dataList) {
         List<Data> items = dataList.getAll();
+        Data dLocation = getData(items, "ld_locations");
+        DataItem[] loc = dLocation.getItems();
 
         HLayout layout = new HLayout();
         layout.setWidth("400px");
@@ -157,7 +159,7 @@
 
         Canvas back = getBackButton(dataList.getState());
 
-        Label selected = new Label("testtext");
+        Label selected = new Label(loc[0].getLabel());
         selected.setWidth("130px");
 
         layout.addMember(label);
@@ -225,6 +227,7 @@
      * @return the selected/inserted data.
      */
     public Data[] getData() {
+        saveLocationValues(locationPanel);
         double[] values = getLocationValues();
         Data[] data = new Data[values.length];
         DataItem item = new DefaultDataItem();
@@ -323,7 +326,7 @@
     protected void updateLocationInfo(DistanceInfoObject[] di) {
         int i = 0;
         for (DistanceInfoObject dio: di) {
-            if (dio.getTo() != null) {
+            if (dio.getTo() == null) {
                 locationTable.addData(new DistanceInfoRecord(dio));
             }
         }

http://dive4elements.wald.intevation.org