Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/minfo/BedCampaignChart.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 | ea9eef426962 |
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; |
66 jextent.put("height", jheight); | 67 jextent.put("height", jheight); |
67 jfilter.put("extent", jextent); | 68 jfilter.put("extent", jextent); |
68 jfix.put("bed", jfilter); | 69 jfix.put("bed", jfilter); |
69 String filter = jfix.toString(); | 70 String filter = jfix.toString(); |
70 | 71 |
71 String imgUrl = GWT.getModuleBaseURL(); | 72 String imgUrl = URL.encode(GWT.getModuleBaseURL() |
72 imgUrl += "bed-km-chart"; | 73 + "bed-km-chart" |
73 imgUrl += "?locale=" + locale; | 74 + "?locale=" + locale |
74 imgUrl += "&filter=" + filter; | 75 + "&filter=" + filter); |
75 | 76 |
76 if (chartImg != null && hasMember(chartImg)) { | 77 if (chartImg != null && hasMember(chartImg)) { |
77 chartImg.setWidth(hWidth); | 78 chartImg.setWidth(hWidth); |
78 chartImg.setHeight(hHeight); | 79 chartImg.setHeight(hHeight); |
79 chartImg.setSrc(imgUrl); | 80 chartImg.setSrc(imgUrl); |