T
thenrick
I want to be able to print out what I have in my form's hashtable.
Here is some of the Java code.
ArrayList reportArray = new ArrayList();
Hashtable reportDetail = new Hashtable();
try {
connection = TomcatConn.newInstance().getConnection("jdbc/main");
dynamicStatement = connection.prepareStatement(report_sql);
log.debug(report_sql);
rs = dynamicStatement.executeQuery();
int colCount = rs.getMetaData().getColumnCount();
grp = new Group();
while (rs.next()) {
grp.setGroupName(rs.getString(1));
grp.setDescription(rs.getString(2));
grp.setParentGroup(rs.getString(3));
reportArray.add(rs.getString("Role"));
reportArray.add(rs.getString("System"));
reportArray.add(rs.getString("Application"));
reportDetail.put(grp,reportArray);
}
form.setReportDetail(reportDetail);
I can print out the data but it all comes at once. I want to be able
to parse it out.
Here is the JSP code I have that prints out this portion.
<logic:notEmpty name="fetchReport" property="reportDetail">
<logic:iterate name="fetchReport" property="reportDetail"
id="reportDetail" >
<logic:iterate name="fetchReport" property="reportDetail" id="group" >
<tr><td><bean:write name="group" />
</td><td><bean:write name="reportArray" /></td></tr>
</logic:iterate>
</logic:iterate>
</logic:notEmpty>
I would like to print out
Group Name Description
Parent Group
Then iterate through the arraylist while the key is the same.
Role System application
..
..
..
Thanks in Advance,
Tom Henricksen
Here is some of the Java code.
ArrayList reportArray = new ArrayList();
Hashtable reportDetail = new Hashtable();
try {
connection = TomcatConn.newInstance().getConnection("jdbc/main");
dynamicStatement = connection.prepareStatement(report_sql);
log.debug(report_sql);
rs = dynamicStatement.executeQuery();
int colCount = rs.getMetaData().getColumnCount();
grp = new Group();
while (rs.next()) {
grp.setGroupName(rs.getString(1));
grp.setDescription(rs.getString(2));
grp.setParentGroup(rs.getString(3));
reportArray.add(rs.getString("Role"));
reportArray.add(rs.getString("System"));
reportArray.add(rs.getString("Application"));
reportDetail.put(grp,reportArray);
}
form.setReportDetail(reportDetail);
I can print out the data but it all comes at once. I want to be able
to parse it out.
Here is the JSP code I have that prints out this portion.
<logic:notEmpty name="fetchReport" property="reportDetail">
<logic:iterate name="fetchReport" property="reportDetail"
id="reportDetail" >
<logic:iterate name="fetchReport" property="reportDetail" id="group" >
<tr><td><bean:write name="group" />
</td><td><bean:write name="reportArray" /></td></tr>
</logic:iterate>
</logic:iterate>
</logic:notEmpty>
I would like to print out
Group Name Description
Parent Group
Then iterate through the arraylist while the key is the same.
Role System application
..
..
..
Thanks in Advance,
Tom Henricksen