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