comparison gnv/src/main/webapp/WEB-INF/jsp/index.jsp @ 18:87002cbd194c

Static UI -integration an some refactoringwork done gnv/trunk@103 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Thu, 17 Sep 2009 14:30:16 +0000
parents d7e5a929fc34
children 367a00e4b9ad
comparison
equal deleted inserted replaced
17:d7e5a929fc34 18:87002cbd194c
1 1 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
2 <%@page import="java.util.Collection"%> 2 <%@page import="java.util.Collection"%>
3 <%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%> 3 <%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%>
4 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> 4 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%>
5 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> 5 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
6 <%@page import="java.util.Iterator"%> 6 <%@page import="java.util.Iterator"%>
7 <%Object ui = request.getAttribute("ui"); 7 <%Object ui = request.getAttribute("ui");
8 Object staticui = request.getAttribute("staticui");
8 boolean furthertargets = true; 9 boolean furthertargets = true;
9 10
10 Object furthertargetsObject = request.getAttribute("furthertargets"); 11 Object furthertargetsObject = request.getAttribute("furthertargets");
11 if (furthertargetsObject != null){ 12 if (furthertargetsObject != null){
12 furthertargets = ((Boolean)furthertargetsObject).booleanValue(); 13 furthertargets = ((Boolean)furthertargetsObject).booleanValue();
13 } 14 }
14 Object diagramm = request.getAttribute("diagramm");
15 String action = (ui == null ? "selectArtifactFactory.do" : "next.do");
16 %> 15 %>
17 <div id="basefilter"> 16 <div>
18 <form id="fisSelectionForm" action="<%=action%>" method="post"> 17 <jsp:include page="includes/display_fis_inc.jsp"></jsp:include>
19 <fieldset> 18 <%if (staticui != null){ %>
20 19 <%=staticui.toString()%>
21 <% 20 <%}%>
22 21
23 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); 22 <%if (ui != null){%>
24 Collection<ArtifactObject> artifactFactories = sm.getArtifactFactories(); 23 <div id="timeseriesfilter">
25 if (artifactFactories != null && ui == null){ 24 <form id="fisSelectionForm" action="next.do" method="post">
26 %> 25 <fieldset>
27 <legend>FIS</legend> 26 <%=ui != null ? ui.toString() : "" %>
28 <select name="artifactFactory"> 27 <br/>
29 <% 28 <%if(furthertargets){%>
30 Iterator<ArtifactObject> it = artifactFactories.iterator(); 29 <input type="submit" value="<bean:message key="gnviewer.select.button"/>"/>
31 while (it.hasNext()){ 30 <%}else{%>
32 ArtifactObject ao = it.next(); 31 <input type="submit" value="<bean:message key="gnviewer.draw.button"/>"/>
33 32 <%}%>
34 %> 33 </fieldset>
35 34 </form>
36 <option value="<%=ao.getId()%>" <%=(ao.isSelected() ? "selected=\"selected\"" : "")%> ><%=ao.getName()%></option> 35 </div>
37 <% 36 <%}%>
38 } 37 </div>
39 %> 38 <jsp:include page="includes/display_diagramm_inc.jsp"></jsp:include>
40 </select>
41 <%
42 }
43 %>
44
45
46 <%=ui != null ? ui.toString() : "" %>
47
48 <input type="submit" value="<%=furthertargets ? "Auswählen" : "Zeichen"%>" />
49 </fieldset>
50 </form>
51 </div>
52 <%if (diagramm != null){ %>
53 <div id="diagram">
54 <%=diagramm.toString()%>
55 </div>
56 <%}%>

http://dive4elements.wald.intevation.org