comparison gnv/src/main/webapp/WEB-INF/jsp/index.jsp @ 998:27029f0ec7e1

Reverted the changes of rev1194. gnv/trunk@1199 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 11 Jun 2010 10:28:50 +0000
parents 9b126bceb0b2
children b1eea43ba133
comparison
equal deleted inserted replaced
997:f55692e3e0ce 998:27029f0ec7e1
1 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> 1 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
2 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-el" prefix="bean-el" %> 2 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean-el" prefix="bean-el" %>
3 <%@page import="java.util.Collection"%>
3 <%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%> 4 <%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%>
4 <%@page import="de.intevation.gnv.action.CommunicationKeys"%> 5 <%@page import="de.intevation.gnv.action.CommunicationKeys"%>
5 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> 6 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%>
6 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> 7 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
8 <%@page import="java.util.Iterator"%>
7 <% 9 <%
10 String exception = (String)request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_INPUT_ID);
8 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); 11 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request);
9 Object ui = request.getAttribute("ui"); 12 Object ui = request.getAttribute("ui");
10 Object staticui = request.getAttribute("staticui"); 13 Object staticui = request.getAttribute("staticui");
11 Object chart = request.getAttribute("chart"); 14 Object chart = request.getAttribute("chart");
12 Object statistic = request.getAttribute("statistic"); 15 Object statistic = request.getAttribute("statistic");
13 Object histogram = request.getAttribute("histogram"); 16 Object histogram = request.getAttribute("histogram");
14 Object wms_published = request.getAttribute("wms_published"); 17 Object wms_published = request.getAttribute("wms_published");
18 boolean furthertargets = true;
15 19
16 if (chart == null && statistic == null && histogram == null && wms_published == null) { 20 if (chart == null && statistic == null && histogram == null && wms_published == null) {
17 boolean supportChart = sm.getOutputMode("chart") != null; 21 boolean supportChart = sm.getOutputMode("chart") != null;
18 if (supportChart) { 22 if (supportChart) {
19 chart = "true"; 23 chart = "true";
20 } 24 }
21 } 25 }
22 26
27 Object furthertargetsObject = request.getAttribute("furthertargets");
28 if (furthertargetsObject != null){
29 furthertargets = ((Boolean)furthertargetsObject).booleanValue();
30 }
23 31
24 Object exceptionMessage = request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID); 32 Object exceptionMessage = request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID);
25 exceptionMessage = (exceptionMessage != null ? exceptionMessage.toString().replaceAll(" ", ".").replaceAll(":",".").toLowerCase() : null); 33 exceptionMessage = (exceptionMessage != null ? exceptionMessage.toString().replaceAll(" ", ".").replaceAll(":",".").toLowerCase() : null);
26 exceptionMessage = (exceptionMessage != null && exceptionMessage.toString().endsWith(".") ? exceptionMessage.toString().substring(0,exceptionMessage.toString().length()-1) : exceptionMessage); 34 exceptionMessage = (exceptionMessage != null && exceptionMessage.toString().endsWith(".") ? exceptionMessage.toString().substring(0,exceptionMessage.toString().length()-1) : exceptionMessage);
27 35
84 </fieldset> 92 </fieldset>
85 </div> 93 </div>
86 <%}%> 94 <%}%>
87 95
88 <%-- render the dynamic part to feed the state and advance to the next state --%> 96 <%-- render the dynamic part to feed the state and advance to the next state --%>
89 <%if (ui != null) { %> 97 <%if (ui != null){%>
90 <%= ui.toString().replaceAll("&nbsp;", "") %> 98 <div id="timeseriesfilter">
99 <form id="fisSelectionForm" onsubmit="displayOverlay()" action="<%=response.encodeURL("next.do")%>" method="post">
100 <fieldset>
101
102 <%-- error message, if user input was not valid --%>
103 <%if (exception != null) {%>
104 <div class="inputException"><%=exception%></div>
105 <%}%>
106 <%=ui != null ? ui.toString().replaceAll("&nbsp;", "") : "" %>
107
108 <%if(furthertargets){%>
109 <br/>
110 <input style="margin-top: 5px;" type="image" src="<bean:message key="gnviewer.select.button.src"/>"/>
111 <%}%>
112 </fieldset>
113 </form>
114 </div>
91 <%}%> 115 <%}%>
92 116
93 <%-- render export options if existing for this state --%> 117 <%-- render export options if existing for this state --%>
94 <jsp:include page="includes/display_export_inc.jsp"></jsp:include> 118 <jsp:include page="includes/display_export_inc.jsp"></jsp:include>
95 119

http://dive4elements.wald.intevation.org