annotate gnv/src/main/java/de/intevation/gnv/action/DoOutputAction.java @ 583:2f3d885fed09

Adjusted http requests and appended a new parameter export mode to 'out'-xml document to choose between svg, pdf or image exports. gnv/trunk@725 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Mar 2010 14:55:29 +0000
parents a634d5ee961d
children 15ac78a91d1b
rev   line source
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 /**
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
2 *
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 */
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
4 package de.intevation.gnv.action;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
5
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
6 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
7 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
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.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
10 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
11
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.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
13 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
14 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
15 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
16
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 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
18
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19 import java.util.ArrayList;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 import java.util.Collection;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 import java.util.Iterator;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 import javax.servlet.http.HttpServletRequest;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24 import javax.servlet.http.HttpServletResponse;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
25
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
26 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
27
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
28 import org.apache.struts.action.ActionForm;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
29 import org.apache.struts.action.ActionForward;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
30 import org.apache.struts.action.ActionMapping;
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
31
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
32 /**
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
33 * @author Tim Englich <tim.englich@intevation.de>
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
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
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 /**
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
51 * @see de.intevation.gnv.action.ArtifactDatabaseActionBase#execute(org.apache.struts.action.ActionMapping,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
52 * org.apache.struts.action.ActionForm,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
53 * javax.servlet.http.HttpServletRequest,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
54 * javax.servlet.http.HttpServletResponse)
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 */
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56 @Override
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 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
58 HttpServletRequest request,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
59 HttpServletResponse response) throws Exception {
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
60 log.debug("DoOutputAction.execute");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
61 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
62 String target = request.getParameter("target");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
63 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
64 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
65
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
66 log.debug("Target: " + target);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
67 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
68 log.debug("ExportMode: " + mode);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
69
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
70 // 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
71
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
72 SessionModel sm = SessionModelFactory.getInstance()
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
73 .getSessionModel(request);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
74 OutputMode outputMode = sm.getOutputMode(target);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
75 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
76 Collection<OutputParameter> inputParameter = outputMode
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
77 .getOutputParameters();
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
78 Collection<InputParameter> ips = null;
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
79 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
80 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
81 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
82 while (it.hasNext()) {
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
83 String name = it.next().getName();
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
84 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
85 InputParameter ip = new DefaultInputParameter(name,
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
86 values);
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
87 ips.add(ip);
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
88 }
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
89
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
90 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
91 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
92 "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
93 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
94 }
30
07e9c137a2f1 Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents: 29
diff changeset
95 }
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
96
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
97 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory
40
23a4f196d7d6 Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 38
diff changeset
98 .getInstance()
23a4f196d7d6 Adding Languagetransfer to the ArtifactDatabase to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 38
diff changeset
99 .getArtifactDatabaseClient(getLocale(request));
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
100
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
101 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
102
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
103 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
104 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
105 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
106 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
107 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
108 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
109 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
110 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
111 ips);
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
112
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
113 outputStream.flush();
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
114 outputStream.close();
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
115 } else {
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
116 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
117 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
118 } 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
119 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
120 + " wis not supported.");
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
121 }
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
122 // TODO FIXME: Fehlerbehandlung
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
123 }
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
124 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
125 } catch (Exception e) {
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
126 log.error(e, e);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
127 request.setAttribute(
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
128 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
129 .getMessage());
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 30
diff changeset
130 return super.getExceptionForward(mapping);
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
131 }
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
132 }
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
133
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 35
diff changeset
134 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
135 HttpServletResponse response,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
136 HttpServletRequest request) {
29
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
137 response.setHeader("Content-Type", mimeType);
bba8fd97e549 Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents: 13
diff changeset
138 }
13
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
139
2535158e2687 Chartoutput Added to the View
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
140 }
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
141 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org