Mercurial > dive4elements > gnv-client
comparison gnv/src/main/webapp/WEB-INF/jsp/includes/display_wms_options_inc.jsp @ 668:ccd47d9887ec
Added an options panel for wms customization (issue198).
gnv/trunk@775 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Mon, 15 Mar 2010 13:46:05 +0000 |
parents | |
children | 271ec4d11a9f |
comparison
equal
deleted
inserted
replaced
667:c4f051adc6e7 | 668:ccd47d9887ec |
---|---|
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" %> | |
3 <%@page import="de.intevation.gnv.action.CommunicationKeys"%> | |
4 <%@page import="de.intevation.gnv.action.sessionmodel.DiagrammOptions"%> | |
5 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> | |
6 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> | |
7 <%@page import="de.intevation.gnv.artifactdatabase.objects.OutputMode"%> | |
8 <%@page import="de.intevation.gnv.artifactdatabase.objects.OutputParameter"%> | |
9 <%@page import="java.util.Collection"%> | |
10 <%@page import="java.util.Iterator"%> | |
11 <%@page import="java.net.URLEncoder"%> | |
12 <% | |
13 String exceptionMsg = (String) request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE); | |
14 String exceptionValue= (String) request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_VALUE); | |
15 String layer = (String) request.getAttribute("layer"); | |
16 String target = "wms"; | |
17 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); | |
18 OutputMode om = sm.getOutputMode(target); | |
19 DiagrammOptions opts = sm.getDiagrammOptions(); | |
20 String uuid = sm.getCurrentArtifact().getId(); | |
21 %> | |
22 | |
23 <div id="diagramOptionsContent"> | |
24 <fieldset> | |
25 <legend onmousedown="displayDiv('diagramOptionsContent');" class="expandableFieldset"> | |
26 <bean:message key="gnviewer.wms.options.header.title"/> | |
27 </legend> | |
28 | |
29 <% if (exceptionMsg != null) {%> | |
30 <div id="chartException" class="chartException"> | |
31 '<%=exceptionValue%>' <bean-el:message key="<%=exceptionMsg%>"/> | |
32 </div> | |
33 <%}%> | |
34 | |
35 <form id="outputOptionsForm" method="POST" action="<%=response.encodeURL("wms.do")%>"> | |
36 <table> | |
37 <% Collection<OutputParameter> params = om.getOutputParameters(); | |
38 if (om != null && params != null && !params.isEmpty()) { | |
39 Iterator<OutputParameter> iter = params.iterator(); | |
40 while (iter.hasNext()) { | |
41 OutputParameter param = iter.next(); %> | |
42 | |
43 <tr> | |
44 <td><bean-el:message key="<%=param.getName()%>"/></td> | |
45 <td> | |
46 <%if (param.getType().equalsIgnoreCase("boolean")) { | |
47 boolean checked = (opts != null) ? "true".equalsIgnoreCase(opts.getValue(param.getName())) : param.getValue().equalsIgnoreCase("true"); | |
48 %> | |
49 <input type="checkbox" name="<%=param.getName()%>" <%=checked ? " value=\"true\" checked=\"checked\"": "" %>/> | |
50 <%} | |
51 else {%> | |
52 <input type="text" name="<%=param.getName() %>" value="<%= (opts != null) ? opts.getValue(param.getName()) : param.getValue()%>"/> | |
53 <%}%> | |
54 </td> | |
55 </tr> | |
56 <%} | |
57 }%> | |
58 <tr> | |
59 <td> | |
60 <input type="image" name="target" value="wms" src="images/arrow_refresh.png" alt="<bean:message key="gnviewer.draw.button"/>"/> | |
61 </td> | |
62 </tr> | |
63 </table> | |
64 </form> | |
65 </fieldset> | |
66 </div> |