comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/ChartOutputTab.java @ 213:7ea004d0ffbc

The ChartOutputTab calls the out() operation of a Collection now - no longer the out() of its first artifact. flys-client/trunk@1655 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 07 Apr 2011 11:31:19 +0000
parents f7967d12ce6e
children 6838e4112eeb
comparison
equal deleted inserted replaced
212:e3ea3c74b7f5 213:7ea004d0ffbc
1 package de.intevation.flys.client.client.ui; 1 package de.intevation.flys.client.client.ui;
2
3 import java.util.Date;
2 4
3 import com.google.gwt.core.client.GWT; 5 import com.google.gwt.core.client.GWT;
4 6
5 import com.smartgwt.client.widgets.Canvas; 7 import com.smartgwt.client.widgets.Canvas;
6 import com.smartgwt.client.widgets.Img; 8 import com.smartgwt.client.widgets.Img;
73 * @return the URL to the chart image. 75 * @return the URL to the chart image.
74 */ 76 */
75 protected String getImgUrl() { 77 protected String getImgUrl() {
76 Config config = Config.getInstance(); 78 Config config = Config.getInstance();
77 String server = config.getServerUrl(); 79 String server = config.getServerUrl();
78 String uuid = collection.getItem(0).identifier();
79 String hash = collection.getItem(0).hash();
80 80
81 String imgUrl = GWT.getModuleBaseURL(); 81 String imgUrl = GWT.getModuleBaseURL();
82 imgUrl += "chart"; 82 imgUrl += "chart";
83 imgUrl += "?target=chart"; 83 imgUrl += "?uuid=" + collection.identifier();
84 imgUrl += "&type=" + mode.getName();
84 imgUrl += "&server=" + server; 85 imgUrl += "&server=" + server;
85 imgUrl += "&mode=img"; 86 imgUrl += "&timestamp=" + new Date().getTime();
86 imgUrl += "&width=600";
87 imgUrl += "&height=400";
88 imgUrl += "&points=false";
89 imgUrl += "&uuid=" + uuid;
90 imgUrl += "&hash=" + hash;
91 87
92 GWT.log("IMAGE URL = " + imgUrl); 88 GWT.log("IMAGE URL = " + imgUrl);
93 89
94 // TODO Build the correct url that points to the OUT() resource of the 90 // TODO Build the correct url that points to the OUT() resource of the
95 // collection. 91 // collection.

http://dive4elements.wald.intevation.org