Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/TableDataPanel.java @ 550:605debcbb6a0
Adjusted the return values of the CSVExportService, so that GWT can handle those values better.
flys-client/trunk@2063 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Tue, 07 Jun 2011 12:51:57 +0000 |
parents | be842e36ce1c |
children | dfbc6693247e |
comparison
equal
deleted
inserted
replaced
549:e74bf6bfeeb6 | 550:605debcbb6a0 |
---|---|
3 import java.util.List; | 3 import java.util.List; |
4 | 4 |
5 import com.google.gwt.core.client.GWT; | 5 import com.google.gwt.core.client.GWT; |
6 import com.google.gwt.user.client.rpc.AsyncCallback; | 6 import com.google.gwt.user.client.rpc.AsyncCallback; |
7 | 7 |
8 import com.smartgwt.client.util.SC; | |
8 import com.smartgwt.client.widgets.Canvas; | 9 import com.smartgwt.client.widgets.Canvas; |
9 import com.smartgwt.client.widgets.Label; | 10 import com.smartgwt.client.widgets.Label; |
10 import com.smartgwt.client.widgets.layout.VLayout; | 11 import com.smartgwt.client.widgets.layout.VLayout; |
11 import com.smartgwt.client.widgets.grid.ListGrid; | 12 import com.smartgwt.client.widgets.grid.ListGrid; |
12 import com.smartgwt.client.widgets.grid.ListGridField; | 13 import com.smartgwt.client.widgets.grid.ListGridField; |
70 String locale = config.getLocale (); | 71 String locale = config.getLocale (); |
71 dataTable.setEmptyMessage(MESSAGES.empty_table()); | 72 dataTable.setEmptyMessage(MESSAGES.empty_table()); |
72 dataTable.setShowHeaderContextMenu(false); | 73 dataTable.setShowHeaderContextMenu(false); |
73 | 74 |
74 exportService.getCSV(url, locale, uuid, name, | 75 exportService.getCSV(url, locale, uuid, name, |
75 new AsyncCallback<List>() { | 76 new AsyncCallback<List<String[]>>() { |
76 public void onFailure(Throwable caught) { | 77 public void onFailure(Throwable caught) { |
77 GWT.log("Could not recieve csv."); | 78 GWT.log("Could not recieve csv."); |
78 GWT.log(caught.getMessage()); | 79 SC.warn(caught.getMessage()); |
79 } | 80 } |
80 | 81 |
81 public void onSuccess(List l) { | 82 public void onSuccess(List<String[]> l) { |
82 GWT.log("Recieved csv with " + l.size() + " lines."); | 83 GWT.log("Recieved csv with " + l.size() + " lines."); |
83 setData(l); | 84 setData(l); |
84 } | 85 } |
85 } | 86 } |
86 ); | 87 ); |