annotate gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java @ 1022:28a0628b11b0

Added license file and license header. gnv/trunk@1258 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Nov 2010 17:15:08 +0000
parents 1b42a86184f6
children
rev   line source
1022
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
1 /*
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
2 * Copyright (c) 2010 by Intevation GmbH
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
3 *
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
4 * This program is free software under the LGPL (>=v2.1)
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
5 * Read the file LGPL.txt coming with the software for details
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
6 * or visit http://www.gnu.org/licenses/ if it does not exist.
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
7 */
28a0628b11b0 Added license file and license header.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1008
diff changeset
8
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 package de.intevation.gnv.action;
683
d49e8695786c Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 681
diff changeset
10
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
11 import java.util.ArrayList;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 import java.util.Collection;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
13 import java.util.Iterator;
706
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
14 import java.util.Locale;
395
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
15 import java.util.Map;
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
16
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
17 import javax.servlet.http.HttpServletRequest;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
18 import javax.servlet.http.HttpServletResponse;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
19
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
20 import org.apache.log4j.Logger;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
21 import org.apache.struts.action.ActionForm;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
22 import org.apache.struts.action.ActionForward;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
23 import org.apache.struts.action.ActionMapping;
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
24
963
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
25 import de.intevation.gnv.action.sessionmodel.SessionModel;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
26 import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
27 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClient;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
28 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
29 import de.intevation.gnv.artifactdatabase.client.exception.ArtifactDatabaseInputException;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
30 import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
31 import de.intevation.gnv.artifactdatabase.objects.DefaultInputParameter;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
32 import de.intevation.gnv.artifactdatabase.objects.InputParameter;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
33
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
34 /**
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
35 * This controller feeds the artifact server with the current input data and
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
36 * refreshes the gui with the current artifact description after the next state
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
37 * is reached.
699
af22fa5567a6 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 690
diff changeset
38 *
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
39 * @author <a href="mailto:tim.englich@intevation.de">Tim Englich</a>
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
40 * @author <a href="mailto:ingo.weinzierl@intevation.de">Ingo Weinzierl</a>
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
41 */
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: 408
diff changeset
42 public class NextArtifactStepAction extends DescribeUIAction {
408
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 401
diff changeset
43
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
44 /**
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
45 * the logger, used to log exceptions and additonaly information
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 */
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
47 private static Logger log = Logger
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
48 .getLogger(SelectArtifactFactoryAction.class);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
49
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 /**
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
51 * Constructor
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
52 */
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
53 public NextArtifactStepAction() {
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
54 super();
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
55 }
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
56
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
57 @Override
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
58 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
59 HttpServletRequest request,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
60 HttpServletResponse response) throws Exception {
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
61 log.debug("NextArtifactStepAction.execute");
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
62 SessionModel sm = SessionModelFactory.getInstance()
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
63 .getSessionModel(request);
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
64 ArtifactDescription ad = sm.getArtifactDescription();
706
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
65
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
66 Locale tmp = sm.getCurrentLocale();
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
67 Locale locale = tmp != null ? tmp : request.getLocale();
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
68
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
69 if (ad != null){
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
70 Collection<String> inputParameter = ad.getInputParameter();
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
71 Collection<InputParameter> ips = null;
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
72 if (inputParameter != null) {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
73 ips = new ArrayList<InputParameter>(inputParameter.size());
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
74 Iterator<String> it = inputParameter.iterator();
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
75 while (it.hasNext()) {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
76 String name = it.next();
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
77 String[] values = request.getParameterValues(name);
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
78 InputParameter ip = new DefaultInputParameter(name, values);
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
79 ips.add(ip);
154
d6b82c585f1f Bugfix NPE was thrown when an Exception occured in the Called ArtifactDatabase-Server issue58.
Tim Englich <tim.englich@intevation.de>
parents: 150
diff changeset
80 }
d6b82c585f1f Bugfix NPE was thrown when an Exception occured in the Called ArtifactDatabase-Server issue58.
Tim Englich <tim.englich@intevation.de>
parents: 150
diff changeset
81 }
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
82 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory
706
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
83 .getInstance().getArtifactDatabaseClient(locale);
2659a5b1fa1e Added a link (and a controller) to toggle between german and english language (issue254).
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 699
diff changeset
84
395
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
85 Map outs = ad.getOutputModes();
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
86 if (outs == null || outs.isEmpty()) {
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
87 // TODO: Woher kommt der zu erreichende Status;
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
88 String target = null;
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
89 if (ad.getReachableStates().size() > 1) {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
90 target = request.getParameter("product"); // TODO HACK for
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
91 // Propducts every
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
92 // other Step has
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
93 // currently only
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
94 // one reachable
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
95 // state.
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
96 } else {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
97 target = ad.getReachableStates().iterator().next();
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
98 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
99
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
100 try {
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: 408
diff changeset
101 adc.doNextStep(
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
102 sm.getSelectedArtifactFactory(),
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: 408
diff changeset
103 sm.getCurrentArtifact(),
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: 408
diff changeset
104 target,
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: 408
diff changeset
105 ips
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: 408
diff changeset
106 );
665
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
107 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
108 catch (ArtifactDatabaseInputException e) {
1008
1b42a86184f6 Removed the changes of rev1206 and 1214.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1002
diff changeset
109 log.error(e, e);
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
110 request.setAttribute(
665
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
111 CommunicationKeys.REQUEST_EXCEPTION_INPUT_ID,
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
112 e.getMessage());
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
113 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
114 catch (Exception e) {
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
115 log.error(e, e);
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
116 request.setAttribute(
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
117 CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID,
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
118 e.getMessage());
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
119 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
120
395
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
121 Map tmpOuts = ad.getOutputModes();
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
122 request.setAttribute(
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
123 "furthertargets",
1008
1b42a86184f6 Removed the changes of rev1206 and 1214.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1002
diff changeset
124 tmpOuts == null || tmpOuts.isEmpty()
395
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
125 );
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
126 } else {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
127 try{
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: 408
diff changeset
128 adc.getCurrentStepDescription(
408
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 401
diff changeset
129 sm.getSelectedArtifactFactory(),
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 401
diff changeset
130 sm.getCurrentArtifact(),
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 401
diff changeset
131 true
b5733f9f386b Design improvements: Moved chart option panel and export actions beneath the parameterization panel on the left side. Do not render a useless 'draw' button after reaching the final state.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 401
diff changeset
132 );
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
133
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
134 request.setAttribute("diagramm", true);
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
135
665
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
136 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
137 catch (ArtifactDatabaseInputException e) {
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
138 log.error(e, e);
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
139 request.setAttribute(
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
140 CommunicationKeys.REQUEST_EXCEPTION_INPUT_ID,
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
141 e.getMessage());
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
142 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
143 catch (Exception e) {
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
144 log.error(e, e);
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
145 request.setAttribute(
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: 408
diff changeset
146 CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID,
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: 408
diff changeset
147 e.getMessage());
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
148 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
149
1008
1b42a86184f6 Removed the changes of rev1206 and 1214.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1002
diff changeset
150 request.setAttribute("furthertargets", false);
150
c5408b0f34c7 Now the UI will compelte be shown if the User has done an Mistake entering
Tim Englich <tim.englich@intevation.de>
parents: 40
diff changeset
151 }
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
152 }else{
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
153 log.warn("SessionTimeout has occured");
991
33198e55371c Improved session handling in the gui. If a session has timed out, the user gets to the start point - the fis selection.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 963
diff changeset
154 return sessionExhaustedForward(mapping, form, request, response);
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
155 }
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
156 return super.execute(mapping, form, request, response);
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
157 }
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
158
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
159 }
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: 408
diff changeset
160 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org