Mercurial > dive4elements > gnv-client
changeset 407:55dae5bb76db
Fixed issue149. Render the chart if there are output modes existing for this state - not if there are further states. TODO: We should check if there is an output mode named 'chart' before rendering a chart.
gnv/trunk@583 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Wed, 20 Jan 2010 14:44:39 +0000 |
parents | a8f0e9fbc81b |
children | b5733f9f386b |
files | gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java |
diffstat | 2 files changed, 21 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/gnv/ChangeLog Wed Jan 20 14:18:32 2010 +0000 +++ b/gnv/ChangeLog Wed Jan 20 14:44:39 2010 +0000 @@ -1,3 +1,14 @@ +2010-01-20 Ingo Weinzierl <ingo.weinzierl@intevation.de> + + Issue149 + + * src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java: Show + chart if there are output modes existing for this state. Set internal + value of checkboxes to 'true' if they are selected. + + TODO: We should check if there is an output mode named 'chart' before + rendering a chart. + 2010-01-20 Ingo Weinzierl <ingo.weinzierl@intevation.de> * src/main/resources/applicationMessages.properties,
--- a/gnv/src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java Wed Jan 20 14:18:32 2010 +0000 +++ b/gnv/src/main/java/de/intevation/gnv/action/ChangeOptionsAction.java Wed Jan 20 14:44:39 2010 +0000 @@ -5,6 +5,7 @@ import java.util.Collection; import java.util.Iterator; +import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -68,6 +69,9 @@ if (value == null){ value = "false"; } + else { + value = "true"; + } } diagrammOptions.setValue(parameter.getName(),value); @@ -101,15 +105,15 @@ request .getRealPath("WEB-INF/config/templates/describe-ui-static.xsl")); request.setAttribute("staticui", staticUI); - request.setAttribute("furthertargets", - (ad.getReachableStates() != null && !ad - .getReachableStates().isEmpty())); - if (ad.getReachableStates() != null - && !ad.getReachableStates().isEmpty()) { - } else { + Map tmpOuts = ad.getOutputModes(); + if (tmpOuts == null || tmpOuts.isEmpty()) { + request.setAttribute("furthertargets", true); + } + else { request.setAttribute("diagramm", true); } + return super.execute(mapping, form, request, response); } catch (Exception e) { log.error(e, e);