annotate gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java @ 1008:1b42a86184f6

Removed the changes of rev1206 and 1214. gnv/trunk@1222 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 25 Jun 2010 08:11:39 +0000
parents b1eea43ba133
children 28a0628b11b0
rev   line source
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
1 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
2
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
3 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
4 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
5 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
6 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
7 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
8
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
9 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
10 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
11
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
12 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
13 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
14 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
15 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
16
963
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
17 import de.intevation.gnv.action.sessionmodel.SessionModel;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
18 import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
19 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClient;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
20 import de.intevation.gnv.artifactdatabase.client.ArtifactDatabaseClientFactory;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
21 import de.intevation.gnv.artifactdatabase.client.exception.ArtifactDatabaseInputException;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
22 import de.intevation.gnv.artifactdatabase.objects.ArtifactDescription;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
23 import de.intevation.gnv.artifactdatabase.objects.DefaultInputParameter;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
24 import de.intevation.gnv.artifactdatabase.objects.InputParameter;
0441e78cd900 Add more Javadocs
Tim Englich <tim.englich@intevation.de>
parents: 706
diff changeset
25
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
26 /**
690
254f062e334b Added JavaDoc.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 684
diff changeset
27 * 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
28 * 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
29 * is reached.
699
af22fa5567a6 Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 690
diff changeset
30 *
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
31 * @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
32 * @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
33 */
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
34 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
35
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
36 /**
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
37 * 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
38 */
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
39 private static Logger log = Logger
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
40 .getLogger(SelectArtifactFactoryAction.class);
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
41
12
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
42 /**
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
43 * Constructor
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 public NextArtifactStepAction() {
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
46 super();
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
47 }
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
48
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
49 @Override
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
50 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
51 HttpServletRequest request,
fccf90761825 Format Code to max 80 Chars per Row better Formatter choosen
Tim Englich <tim.englich@intevation.de>
parents: 36
diff changeset
52 HttpServletResponse response) throws Exception {
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
53 log.debug("NextArtifactStepAction.execute");
36
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
54 SessionModel sm = SessionModelFactory.getInstance()
ad381cc47217 Format Code to max 80 Chars per Row
Tim Englich <tim.englich@intevation.de>
parents: 34
diff changeset
55 .getSessionModel(request);
34
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
56 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
57
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
58 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
59 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
60
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
61 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
62 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
63 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
64 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
65 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
66 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
67 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
68 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
69 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
70 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
71 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
72 }
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
73 }
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
74 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
75 .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
76
395
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
77 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
78 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
79 // 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
80 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
81 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
82 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
83 // 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
84 // 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
85 // 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
86 // 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
87 // state.
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
88 } else {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
89 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
90 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
91
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
92 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
93 adc.doNextStep(
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
94 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
95 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
96 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
97 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
98 );
665
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
99 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
100 catch (ArtifactDatabaseInputException e) {
1008
1b42a86184f6 Removed the changes of rev1206 and 1214.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1002
diff changeset
101 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
102 request.setAttribute(
665
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
103 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
104 e.getMessage());
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
105 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
106 catch (Exception e) {
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
107 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
108 request.setAttribute(
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
109 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
110 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
111 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
112
395
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
113 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
114 request.setAttribute(
79378c4babde Fixed a bug which prevented the user to draw charts.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 394
diff changeset
115 "furthertargets",
1008
1b42a86184f6 Removed the changes of rev1206 and 1214.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1002
diff changeset
116 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
117 );
163
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
118 } else {
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
119 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
120 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
121 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
122 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
123 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
124 );
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
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 request.setAttribute("diagramm", true);
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
127
665
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
128 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
129 catch (ArtifactDatabaseInputException e) {
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
130 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
131 request.setAttribute(
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
132 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
133 e.getMessage());
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
134 }
27f25b9ae9af Improved exception handling. Display error messages after invalid user input.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 409
diff changeset
135 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
136 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
137 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
138 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
139 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
140 }
681
15ac78a91d1b Removed trailing whitespace.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 665
diff changeset
141
1008
1b42a86184f6 Removed the changes of rev1206 and 1214.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents: 1002
diff changeset
142 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
143 }
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 }else{
1fe52a0cbd1f Catch NPE and tell the user that the Session has expired. issue80
Tim Englich <tim.englich@intevation.de>
parents: 157
diff changeset
145 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
146 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
147 }
25fdec8b4c69 Added Global Errorhandling to the GNV-Client
Tim Englich <tim.englich@intevation.de>
parents: 32
diff changeset
148 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
149 }
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
150
4ebe57b170d3 Integration of moving through the Artifact-States and rendering the UI.
Tim Englich <tim.englich@intevation.de>
parents:
diff changeset
151 }
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
152 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf-8 :

http://dive4elements.wald.intevation.org