Mercurial > dive4elements > gnv-client
annotate gnv/src/main/java/de/intevation/gnv/action/DoOutputAction.java @ 706:2659a5b1fa1e
Added a link (and a controller) to toggle between german and english language (issue254).
gnv/trunk@970 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 23 Apr 2010 07:55:05 +0000 |
parents | af22fa5567a6 |
children | 33198e55371c |
rev | line source |
---|---|
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
1 package de.intevation.gnv.action; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
2 |
409
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
3 import de.intevation.gnv.action.sessionmodel.SessionModel; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
4 import de.intevation.gnv.action.sessionmodel.SessionModelFactory; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
5 |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
6 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClient; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
7 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
8 |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
9 import de.intevation.gnv.artifactdatabase.objects.DefaultInputParameter; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
10 import de.intevation.gnv.artifactdatabase.objects.InputParameter; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
11 import de.intevation.gnv.artifactdatabase.objects.OutputMode; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
12 import de.intevation.gnv.artifactdatabase.objects.OutputParameter; |
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
13 |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
14 import java.io.OutputStream; |
409
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
15 |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
16 import java.util.ArrayList; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
17 import java.util.Collection; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
18 import java.util.Iterator; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
19 |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
20 import javax.servlet.http.HttpServletRequest; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
21 import javax.servlet.http.HttpServletResponse; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
22 |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
23 import org.apache.log4j.Logger; |
409
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
24 |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
25 import org.apache.struts.action.ActionForm; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
26 import org.apache.struts.action.ActionForward; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
27 import org.apache.struts.action.ActionMapping; |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
28 |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
29 /** |
690
254f062e334b
Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
684
diff
changeset
|
30 * This controller calls the out operation of the server directly. Html img-tags |
254f062e334b
Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
684
diff
changeset
|
31 * in jsp pages use this action to fetch charts and histograms. |
699
af22fa5567a6
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
690
diff
changeset
|
32 * |
684
57fa8019fbdc
Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
683
diff
changeset
|
33 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a> |
681
15ac78a91d1b
Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
583
diff
changeset
|
34 * |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
35 */ |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
36 public class DoOutputAction extends ArtifactDatabaseActionBase { |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
37 |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
38 /** |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
39 * the logger, used to log exceptions and additonaly information |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
40 */ |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
41 private static Logger log = Logger.getLogger(DoOutputAction.class); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
42 |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
43 /** |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
44 * Constructor |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
45 */ |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
46 public DoOutputAction() { |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
47 super(); |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
48 } |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
49 |
690
254f062e334b
Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
684
diff
changeset
|
50 |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
51 @Override |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
52 public ActionForward execute(ActionMapping mapping, ActionForm form, |
38
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
53 HttpServletRequest request, |
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
54 HttpServletResponse response) throws Exception { |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
55 log.debug("DoOutputAction.execute"); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
56 try { |
583
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
57 String target = request.getParameter("target"); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
58 String mimeType = request.getParameter("mimetype"); |
583
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
59 String mode = request.getParameter("mode"); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
60 |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
61 log.debug("Target: " + target); |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
62 log.debug("MimeType: " + mimeType); |
583
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
63 log.debug("ExportMode: " + mode); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
64 |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
65 // TODO Check if is propper; |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
66 |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
67 SessionModel sm = SessionModelFactory.getInstance() |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
68 .getSessionModel(request); |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
69 OutputMode outputMode = sm.getOutputMode(target); |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
70 if (outputMode != null && outputMode.getMimeType().equals(mimeType)) { |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
71 Collection<OutputParameter> inputParameter = outputMode |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
72 .getOutputParameters(); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
73 Collection<InputParameter> ips = null; |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
74 if (inputParameter != null) { |
575
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
75 ips = new ArrayList<InputParameter>(inputParameter.size()+1); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
76 Iterator<OutputParameter> it = inputParameter.iterator(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
77 while (it.hasNext()) { |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
78 String name = it.next().getName(); |
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
79 String[] values = request.getParameterValues(name); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
80 InputParameter ip = new DefaultInputParameter(name, |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
81 values); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
82 ips.add(ip); |
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
83 } |
575
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
84 |
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
85 if (request.getParameter("bintype") != null) { |
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
86 InputParameter ip = new DefaultInputParameter( |
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
87 "bintype", request.getParameterValues("bintype")); |
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
88 ips.add(ip); |
a634d5ee961d
Added checkboxes for selecting the field which is used to adjust the number of bins in histogram charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
409
diff
changeset
|
89 } |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
90 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
91 |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
92 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory |
40
23a4f196d7d6
Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
38
diff
changeset
|
93 .getInstance() |
23a4f196d7d6
Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
38
diff
changeset
|
94 .getArtifactDatabaseClient(getLocale(request)); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
95 |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
96 this.setHeaders(target, mimeType, response, request); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
97 |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
98 OutputStream outputStream = response.getOutputStream(); |
583
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
99 adc.doOutput( |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
100 sm.getSelectedArtifactFactory(), |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
101 sm.getCurrentArtifact(), |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
102 outputStream, |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
103 target, |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
104 mode, |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
105 mimeType, |
2f3d885fed09
Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
575
diff
changeset
|
106 ips); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
107 |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
108 outputStream.flush(); |
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
109 outputStream.close(); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
110 } else { |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
111 if (outputMode == null) { |
390
f2e2053ecf23
Removed Encodingerrors from listed Files. All Files are now UTF-8 compliant.
Tim Englich <tim.englich@intevation.de>
parents:
40
diff
changeset
|
112 log.error("Outputmode is not supported."); |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
113 } else if (!outputMode.getMimeType().equals(mimeType)) { |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
114 log.error("MimeType " + mimeType |
390
f2e2053ecf23
Removed Encodingerrors from listed Files. All Files are now UTF-8 compliant.
Tim Englich <tim.englich@intevation.de>
parents:
40
diff
changeset
|
115 + " wis not supported."); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
116 } |
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
117 // TODO FIXME: Fehlerbehandlung |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
118 } |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
119 return super.execute(mapping, form, request, response); |
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
120 } catch (Exception e) { |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
121 log.error(e, e); |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
122 request.setAttribute( |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
123 CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID, e |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
124 .getMessage()); |
34
25fdec8b4c69
Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents:
30
diff
changeset
|
125 return super.getExceptionForward(mapping); |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
126 } |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
127 } |
36
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
128 |
ad381cc47217
Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents:
35
diff
changeset
|
129 protected void setHeaders(String target, String mimeType, |
38
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
130 HttpServletResponse response, |
fccf90761825
Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents:
36
diff
changeset
|
131 HttpServletRequest request) { |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
132 response.setHeader("Content-Type", mimeType); |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
13
diff
changeset
|
133 } |
13
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
134 |
2535158e2687
Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
135 } |
409
df78178e1180
Moved user interface creation to an own action. This makes avoids code duplication and makes it easier to write new action to handle special interactions, because there is no need for parsing the describe document and creating the user interface after this.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
390
diff
changeset
|
136 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 : |