comparison gnv/src/main/webapp/WEB-INF/jsp/index.jsp @ 8:65ff6fcfee0c

Some Basic Stuff for WebProjects gnv/trunk@84 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Mon, 14 Sep 2009 13:56:03 +0000
parents 72951b955f00
children 3cb753564552
comparison
equal deleted inserted replaced
7:fe6a64545552 8:65ff6fcfee0c
1 <html> 1
2 <%@page import="java.util.Collection"%>
3 <%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%>
4 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%>
5 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
6 <%@page import="java.util.Iterator"%><html>
2 <body> 7 <body>
3 <h2>Hello World!</h2> 8 <form action="selectArtifactFactory.do" method="post">
9 <select name="artifactFactory">
10 <%
11 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request);
12 Collection<ArtifactObject> artifactFactories = sm.getArtifactFactories();
13 if (artifactFactories != null){
14 Iterator<ArtifactObject> it = artifactFactories.iterator();
15 while (it.hasNext()){
16 ArtifactObject ao = it.next();
17
18 %>
19
20 <option value="<%=ao.getId()%>" <%=(ao.isSelected() ? "selected=\"selected\"" : "")%> ><%=ao.getName()%></option>
21 <%
22 }
23 }
24 %>
25 </select>
26 <input type="submit" value="Auswählen" />
27 </form>
4 </body> 28 </body>
5 </html> 29 </html>

http://dive4elements.wald.intevation.org