diff gnv/src/main/webapp/WEB-INF/jsp/index.jsp @ 581:f0f0d4eaee58

Display chart when reaching a final state which doesn't need any further user input (issue184). gnv/trunk@722 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 02 Mar 2010 09:02:31 +0000
parents f2ba58011a2d
children b31e81f35b64
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/index.jsp	Mon Mar 01 15:52:24 2010 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/index.jsp	Tue Mar 02 09:02:31 2010 +0000
@@ -4,13 +4,22 @@
 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%>
 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
 <%@page import="java.util.Iterator"%>
-<%  Object ui              = request.getAttribute("ui");
+<%  
+    SessionModel sm        = SessionModelFactory.getInstance().getSessionModel(request);
+    Object ui              = request.getAttribute("ui");
     Object staticui        = request.getAttribute("staticui");
     Object chart           = request.getAttribute("chart");
     Object statistic       = request.getAttribute("statistic");
     Object histogram       = request.getAttribute("histogram");
     Object wms             = request.getAttribute("wms");
     boolean furthertargets = true;
+
+    if (chart == null && statistic == null && histogram == null && wms == null) {
+        boolean supportChart = sm.getOutputMode("chart") != null;
+        if (supportChart) {
+            chart = "true";
+        }
+    }
       
     Object furthertargetsObject = request.getAttribute("furthertargets");
     if (furthertargetsObject != null){

http://dive4elements.wald.intevation.org