Mercurial > dive4elements > gnv-client
annotate gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp @ 161:9b35599f50bb
BugFix: Text-Inputfields will now be diabaled in static-ui issue81
gnv/trunk@320 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Tim Englich <tim.englich@intevation.de> |
---|---|
date | Wed, 11 Nov 2009 12:12:10 +0000 |
parents | f38a86c2c012 |
children | ef10bf497a16 |
rev | line source |
---|---|
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
1 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %> |
22
367a00e4b9ad
Some GUI-Improvements done
Tim Englich <tim.englich@intevation.de>
parents:
18
diff
changeset
|
2 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%> |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
3 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%> |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
4 <%@page import="de.intevation.gnv.action.sessionmodel.DiagrammOptions"%> |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
5 <%@page import="de.intevation.gnv.artifactdatabase.objects.OutputParameter"%> |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
6 <%@page import="java.util.Collection"%> |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
7 <%@page import="java.util.Iterator"%> |
22
367a00e4b9ad
Some GUI-Improvements done
Tim Englich <tim.englich@intevation.de>
parents:
18
diff
changeset
|
8 <%Object diagramm = request.getAttribute("diagramm"); |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
9 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); |
22
367a00e4b9ad
Some GUI-Improvements done
Tim Englich <tim.englich@intevation.de>
parents:
18
diff
changeset
|
10 if (diagramm != null){ |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
11 String target = "chart"; |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
12 String targetCSV = "csv"; |
158
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
13 String targetODV = "odv"; |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
14 boolean supportChart = sm.getOutputMode(target) != null; |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
15 boolean supportCSV = sm.getOutputMode(targetCSV) != null; |
158
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
16 boolean supportODV = sm.getOutputMode(targetODV) != null; |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
17 String mimeType = null; |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
18 String parameterString = ""; |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
19 if (supportChart){ |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
20 mimeType = sm.getOutputMode(target).getMimeType(); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
21 DiagrammOptions diagrammOptions = sm.getDiagrammOptions(); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
22 Collection<OutputParameter> op = sm.getOutputMode(target).getOutputParameters(); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
23 if (op != null){ |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
24 Iterator<OutputParameter> it = op.iterator(); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
25 while (it.hasNext()){ |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
26 OutputParameter parameter = it.next(); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
27 parameterString = parameterString +"&"+parameter.getName()+"="+(diagrammOptions != null ? diagrammOptions.getValue(parameter.getName()): parameter.getValue()); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
28 } |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
29 } |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
30 } |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
31 String mimeTypeCSV = null; |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
32 if (supportCSV){ |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
33 mimeTypeCSV = sm.getOutputMode(targetCSV).getMimeType(); |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
34 } |
158
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
35 |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
36 String mimeTypeODV = null; |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
37 if (supportODV){ |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
38 mimeTypeODV = sm.getOutputMode(targetODV).getMimeType(); |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
39 } |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
40 %> |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
41 <div id="diagram"> |
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
42 <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/> |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
43 <br/> |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
44 <div id="export"> |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
45 <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>"> |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
46 <img src="images/diagram_export.png" border="0"/> |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
47 </a> |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
48 <%if (supportCSV) { %> |
158
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
49 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.csv.title"/>"> |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
50 <img src="images/data_export.png" border="0"/> |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
51 </a> |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
52 <%}%> |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
53 <%if (supportODV) { %> |
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
54 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeODV+"&target="+targetODV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.odv.title"/>"> |
29
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
55 <img src="images/data_export.png" border="0"/> |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
56 </a> |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
57 <%}%> |
bba8fd97e549
Export and Diagrammoptions integrated into GUI
Tim Englich <tim.englich@intevation.de>
parents:
22
diff
changeset
|
58 </div> |
30
07e9c137a2f1
Added dynamic Outputparameter Support and Outputparameter-manipulation
Tim Englich <tim.englich@intevation.de>
parents:
29
diff
changeset
|
59 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include> |
18
87002cbd194c
Static UI -integration an some refactoringwork done
Tim Englich <tim.englich@intevation.de>
parents:
diff
changeset
|
60 </div> |
158
f38a86c2c012
Added link to export data as odv.
Ingo Weinzierl <ingo.weinzierl@intevation.de>
parents:
31
diff
changeset
|
61 <%}%> |