Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedloadCampaignChart.java @ 8865:0d7c8c943b60 3.2.x
URL-encode URLs (potentially) containing invalid characters.
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 22 Jan 2018 16:38:32 +0100 |
parents | 5e38e2924c07 |
children |
comparison
equal
deleted
inserted
replaced
8864:fa8897698133 | 8865:0d7c8c943b60 |
---|---|
7 */ | 7 */ |
8 | 8 |
9 package org.dive4elements.river.client.client.ui.minfo; | 9 package org.dive4elements.river.client.client.ui.minfo; |
10 | 10 |
11 import com.google.gwt.core.client.GWT; | 11 import com.google.gwt.core.client.GWT; |
12 import com.google.gwt.http.client.URL; | |
12 import com.google.gwt.json.client.JSONNumber; | 13 import com.google.gwt.json.client.JSONNumber; |
13 import com.google.gwt.json.client.JSONObject; | 14 import com.google.gwt.json.client.JSONObject; |
14 import com.google.gwt.json.client.JSONString; | 15 import com.google.gwt.json.client.JSONString; |
15 import com.smartgwt.client.types.Alignment; | 16 import com.smartgwt.client.types.Alignment; |
16 import com.smartgwt.client.widgets.Img; | 17 import com.smartgwt.client.widgets.Img; |
69 jextent.put("height", jheight); | 70 jextent.put("height", jheight); |
70 jfilter.put("extent", jextent); | 71 jfilter.put("extent", jextent); |
71 jfix.put("bedload", jfilter); | 72 jfix.put("bedload", jfilter); |
72 String filter = jfix.toString(); | 73 String filter = jfix.toString(); |
73 | 74 |
74 String imgUrl = GWT.getModuleBaseURL(); | 75 String imgUrl = URL.encode(GWT.getModuleBaseURL() |
75 imgUrl += "bedload-km-chart"; | 76 + "bedload-km-chart" |
76 imgUrl += "?locale=" + locale; | 77 + "?locale=" + locale |
77 imgUrl += "&filter=" + filter; | 78 + "&filter=" + filter); |
78 | 79 |
79 if (chartImg != null && hasMember(chartImg)) { | 80 if (chartImg != null && hasMember(chartImg)) { |
80 chartImg.setWidth(hWidth); | 81 chartImg.setWidth(hWidth); |
81 chartImg.setHeight(hHeight); | 82 chartImg.setHeight(hHeight); |
82 chartImg.setSrc(imgUrl); | 83 chartImg.setSrc(imgUrl); |