Mercurial > dive4elements > gnv-client
diff 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 |
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Mon Sep 14 13:46:25 2009 +0000 +++ b/gnv/src/main/webapp/WEB-INF/jsp/index.jsp Mon Sep 14 13:56:03 2009 +0000 @@ -1,5 +1,29 @@ -<html> + +<%@page import="java.util.Collection"%> +<%@page import="de.intevation.gnv.artifactdatabase.objects.ArtifactObject"%> +<%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> +<%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> +<%@page import="java.util.Iterator"%><html> <body> -<h2>Hello World!</h2> +<form action="selectArtifactFactory.do" method="post"> +<select name="artifactFactory"> +<% + SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); + Collection<ArtifactObject> artifactFactories = sm.getArtifactFactories(); + if (artifactFactories != null){ + Iterator<ArtifactObject> it = artifactFactories.iterator(); + while (it.hasNext()){ + ArtifactObject ao = it.next(); + +%> + + <option value="<%=ao.getId()%>" <%=(ao.isSelected() ? "selected=\"selected\"" : "")%> ><%=ao.getName()%></option> +<% + } + } +%> + </select> + <input type="submit" value="Auswählen" /> +</form> </body> </html>