# HG changeset patch # User Sascha L. Teichmann # Date 1340279737 0 # Node ID be99bf1aa59bd28ada654919090b712c811b6aad # Parent 1f63e2ef03d235fbbf57cbc21600956a6eead3f1 Create simplified column filter. flys-client/trunk@4739 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 1f63e2ef03d2 -r be99bf1aa59b flys-client/ChangeLog --- a/flys-client/ChangeLog Thu Jun 21 11:32:22 2012 +0000 +++ b/flys-client/ChangeLog Thu Jun 21 11:55:37 2012 +0000 @@ -1,3 +1,11 @@ +2012-06-21 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java: + Create + "columns": { "cids": "1 2 3" } + instead of + "or": ["column": { "cid": 1 }, "column": { "cid": 2 }, "column": { "cid": 3 }] + 2012-06-21 Sascha L. Teichmann * src/main/java/de/intevation/flys/client/server/FixingsOverviewServiceImpl.java: diff -r 1f63e2ef03d2 -r be99bf1aa59b flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java Thu Jun 21 11:32:22 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/fixation/FixationPanel.java Thu Jun 21 11:55:37 2012 +0000 @@ -8,7 +8,6 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.rpc.AsyncCallback; -import com.google.gwt.json.client.JSONArray; import com.google.gwt.json.client.JSONObject; import com.google.gwt.json.client.JSONNumber; import com.google.gwt.json.client.JSONString; @@ -495,16 +494,15 @@ and.put("sector-range", classrange); } if (this.events.length > 0) { - JSONArray col = new JSONArray(); - for(int i = 0; i < this.events.length; i++) { - JSONObject column = new JSONObject(); - JSONObject cid = new JSONObject(); - JSONNumber id = new JSONNumber(this.events[i]); - cid.put("cid", id); - column.put("column", cid); - col.set(i, column); + StringBuilder cids = new StringBuilder(); + + for (int i = 0; i < events.length; i++) { + if (i > 0) cids.append(' '); + cids.append(events[i]); } - and.put("or", col); + JSONObject columns = new JSONObject(); + columns.put("cids", new JSONString(cids.toString())); + and.put("columns", columns); } if (and.size() > 0) { JSONObject filter = new JSONObject();