changeset 587:602521c3fac3

Reset diagram options after switching from chart to histogram or the other way around (issue190). gnv/trunk@740 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 05 Mar 2010 15:50:10 +0000
parents 97d90e314af5
children 15af6e7ecf3a
files gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/CreateChartAction.java gnv/src/main/java/de/intevation/gnv/action/CreateHistogramAction.java gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp
diffstat 4 files changed, 26 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Fri Mar 05 09:58:57 2010 +0000
+++ b/gnv/ChangeLog	Fri Mar 05 15:50:10 2010 +0000
@@ -1,3 +1,17 @@
+2010-03-05  Ingo Weinzierl <ingo.weinzierl@intevation.de>
+
+	  Issue190
+
+	* src/main/java/de/intevation/gnv/action/CreateHistogramAction.java,
+	  src/main/java/de/intevation/gnv/action/CreateChartAction.java: Reset
+	  diagram options. Switching between chart and histogram caused some 'null'
+	  values in text fields. After resetting these options, we don't have these
+	  problems anymore - text fields will be filled with default values in this
+	  case.
+
+	* src/main/webapp/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp:
+	  Removed useless file.
+
 2010-03-05  Tim Englich  <tim.englich@intevation.de>
 
 	* src/main/webapp/WEB-INF/config/templates/describe-ui.xsl: 
--- a/gnv/src/main/java/de/intevation/gnv/action/CreateChartAction.java	Fri Mar 05 09:58:57 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/CreateChartAction.java	Fri Mar 05 15:50:10 2010 +0000
@@ -1,5 +1,8 @@
 package de.intevation.gnv.action;
 
+import de.intevation.gnv.action.sessionmodel.SessionModel;
+import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -32,6 +35,9 @@
     throws Exception {
         logger.debug("Create chart.");
 
+        SessionModel sm = SessionModelFactory.getInstance().getSessionModel(
+            request);
+        sm.setDiagrammOptions(null);
         request.setAttribute("chart", true);
 
         return super.execute(mapping, form, request, response);
--- a/gnv/src/main/java/de/intevation/gnv/action/CreateHistogramAction.java	Fri Mar 05 09:58:57 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/CreateHistogramAction.java	Fri Mar 05 15:50:10 2010 +0000
@@ -1,5 +1,8 @@
 package de.intevation.gnv.action;
 
+import de.intevation.gnv.action.sessionmodel.SessionModel;
+import de.intevation.gnv.action.sessionmodel.SessionModelFactory;
+
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
@@ -32,6 +35,9 @@
     throws Exception {
         logger.debug("Create histogram.");
 
+        SessionModel sm = SessionModelFactory.getInstance().getSessionModel(
+            request);
+        sm.setDiagrammOptions(null);
         request.setAttribute("histogram", true);
 
         return super.execute(mapping, form, request, response);
--- a/gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp	Fri Mar 05 09:58:57 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<div id="diagramoptions">
-    <%--
-    <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_statistics_inc.jsp"></jsp:include>
-    --%>
-</div>

http://dive4elements.wald.intevation.org