# HG changeset patch # User Ingo Weinzierl # Date 1304940110 0 # Node ID 6838e4112eeb09c36a045681d47ad26d30d62666 # Parent aea3ab5997b2376c4132492a7b237928ca1d00a0 Bugfix: the current locale string is used to fetch chart images now. flys-client/trunk@1864 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r aea3ab5997b2 -r 6838e4112eeb flys-client/ChangeLog --- a/flys-client/ChangeLog Mon May 09 10:31:54 2011 +0000 +++ b/flys-client/ChangeLog Mon May 09 11:21:50 2011 +0000 @@ -1,3 +1,10 @@ +2011-05-09 Ingo Weinzierl + + * src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java, + src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java: + Bugfix: the current locale string is used to fetch the chart image now + which enables the client to present localized charts. + 2011-05-09 Ingo Weinzierl * src/main/java/de/intevation/flys/client/client/ui/ProjectList.java: diff -r aea3ab5997b2 -r 6838e4112eeb flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java Mon May 09 10:31:54 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java Mon May 09 11:21:50 2011 +0000 @@ -76,19 +76,15 @@ */ protected String getImgUrl() { Config config = Config.getInstance(); - String server = config.getServerUrl(); String imgUrl = GWT.getModuleBaseURL(); imgUrl += "chart"; imgUrl += "?uuid=" + collection.identifier(); imgUrl += "&type=" + mode.getName(); - imgUrl += "&server=" + server; + imgUrl += "&server=" + config.getServerUrl(); + imgUrl += "&locale=" + config.getLocale(); imgUrl += "×tamp=" + new Date().getTime(); - GWT.log("IMAGE URL = " + imgUrl); - - // TODO Build the correct url that points to the OUT() resource of the - // collection. return imgUrl; } } diff -r aea3ab5997b2 -r 6838e4112eeb flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java --- a/flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java Mon May 09 10:31:54 2011 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/ChartOutputServiceImpl.java Mon May 09 11:21:50 2011 +0000 @@ -34,12 +34,13 @@ String serverUrl = req.getParameter("server"); String uuid = req.getParameter("uuid"); String type = req.getParameter("type"); + String locale = req.getParameter("locale"); String mimeType = "image/png"; Document request = ClientProtocolUtils.newOutCollectionDocument( uuid, type); - HttpClient client = new HttpClientImpl(serverUrl); + HttpClient client = new HttpClientImpl(serverUrl, locale); client.collectionOut(request, uuid, "chart", out); out.close();