1 |
3542
|
leinfelder
|
<%@page import="java.sql.ResultSet"%>
|
2 |
|
|
<%@page import="edu.ucsb.nceas.first.metacat.client.AssessmentQuery"%>
|
3 |
|
|
<%@page import="java.util.*"%>
|
4 |
|
|
<%
|
5 |
|
|
|
6 |
|
|
String[] docids = request.getParameterValues("docids");
|
7 |
|
|
|
8 |
|
|
if (docids != null && docids.length > 0) {
|
9 |
|
|
|
10 |
|
|
List assessmentDocIds = Arrays.asList(docids);
|
11 |
|
|
|
12 |
|
|
//make a title
|
13 |
|
|
String tableTitle = "Showing data for ";
|
14 |
|
|
for (int i=0; i<docids.length; i++) {
|
15 |
|
|
tableTitle += docids[i];
|
16 |
|
|
tableTitle +=", ";
|
17 |
|
|
}
|
18 |
|
|
tableTitle = tableTitle.substring(0, tableTitle.length()-2);
|
19 |
|
|
|
20 |
|
|
//AssessmentQuery.testEcogrid("edml.4.5");
|
21 |
|
|
ResultSet rs = AssessmentQuery.selectResponseData(assessmentDocIds);
|
22 |
|
|
int numColumns = rs.getMetaData().getColumnCount();
|
23 |
|
|
%>
|
24 |
|
|
|
25 |
|
|
<!-- <h3><%=tableTitle %></h3> -->
|
26 |
|
|
|
27 |
|
|
<table>
|
28 |
|
|
<!--
|
29 |
|
|
<tr>
|
30 |
|
|
<th colspan="<%=numColumns %>"><%=tableTitle %></th>
|
31 |
|
|
</tr>
|
32 |
|
|
-->
|
33 |
|
|
<tr>
|
34 |
|
|
<% for (int i=1; i<=numColumns; i++) { %>
|
35 |
|
|
<th><%=rs.getMetaData().getColumnName(i) %></th>
|
36 |
|
|
<% } %>
|
37 |
|
|
</tr>
|
38 |
|
|
<%
|
39 |
|
|
while (rs.next()) {
|
40 |
|
|
//System.out.println("rs:" + rs.getInt(1));
|
41 |
|
|
%>
|
42 |
|
|
<tr>
|
43 |
|
|
<% for (int i=1; i<=numColumns; i++) { %>
|
44 |
|
|
<td><%=rs.getInt(i) %></td>
|
45 |
|
|
<% } %>
|
46 |
|
|
</tr>
|
47 |
|
|
<%
|
48 |
|
|
}
|
49 |
|
|
%>
|
50 |
|
|
</table>
|
51 |
|
|
|
52 |
|
|
<%}//end if %>
|