changeset 395:79378c4babde

Fixed a bug which prevented the user to draw charts. gnv/trunk@541 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 14 Jan 2010 10:34:39 +0000
parents 14eecfde4607
children 8330c1dbab34
files gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java
diffstat 2 files changed, 17 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Wed Jan 13 22:17:02 2010 +0000
+++ b/gnv/ChangeLog	Thu Jan 14 10:34:39 2010 +0000
@@ -1,4 +1,12 @@
-2010-01-13  Ingo Weinzierl <ingo_weinzierl@web.de>
+2010-01-14  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	* src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java:
+	  Fixed a bug which caused that the user was not able to draw charts
+	  anymore. Query the 'output' node of the describe document and render a
+	  'draw'-button if existing. If 'output' is not existing, render a 'select'
+	  button to step forward to the next step.
+
+2010-01-13  Ingo Weinzierl <ingo.weinzierl@intevation.de>
 
 	* src/main/java/de/intevation/gnv/artifactdatabase/client/ArtifactDatabaseClient.java,
 	  src/main/java/de/intevation/gnv/artifactdatabase/client/DefaultArtifactDatabaseClient.java:
--- a/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java	Wed Jan 13 22:17:02 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/NextArtifactStepAction.java	Thu Jan 14 10:34:39 2010 +0000
@@ -6,6 +6,7 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Iterator;
+import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -75,8 +76,8 @@
                 ArtifactDatabaseClient adc = ArtifactDatabaseClientFactory
                                                     .getInstance()
                                                     .getArtifactDatabaseClient(getLocale(request));
-                if (ad.getReachableStates() != null
-                    && !ad.getReachableStates().isEmpty()) {
+                Map outs = ad.getOutputModes();
+                if (outs == null || outs.isEmpty()) {
                     // TODO: Woher kommt der zu erreichende Status;
                     String target = null;
                     if (ad.getReachableStates().size() > 1) {
@@ -133,10 +134,11 @@
                             request.setAttribute("staticui", staticUI);
                         }
                     }
-                    request.setAttribute("furthertargets",
-                            (ad.getReachableStates() != null && !ad
-                                    .getReachableStates().isEmpty()));
-    
+                    Map tmpOuts = ad.getOutputModes();
+                    request.setAttribute(
+                        "furthertargets",
+                        tmpOuts == null || tmpOuts.isEmpty()
+                    );
                 } else {
                     // statistic abholen und in das sessionmodell schreiben.
                     ArtifactDescription artifactDescription;

http://dive4elements.wald.intevation.org