Hi All,
I've looked in various places (this list included, google, jakarta struts
site), and can't seem to find the answer to this question. I would like to
iterate through a map, where the value of the map is another map. In plain
old jsp, this is what it would look like:
<jsp:useBean id="failedJobs" scope="request" class="java.util.HashMap"/>
<%
Set keys = failedJobs.keySet();
for (Iterator i = keys.iterator(); i.hasNext(); )
{
String key = (String) i.next();
HashMap failedJob = (HashMap) failedJobs.get(key);
%>
<tr align="center">
<td><input type="checkbox" name="jobIds" group="jobs" value="<%= key
%>"/></td></td>
<td><%= key %></td>
<td><%= failedJob.get("LOGFILE_NAME") %></td>
<td><%= failedJob..get("START_TIME") %></td>
</tr>
<%
} // end for
This is how far I get in struts:
<logic:iterate name="failedJobs" id="mapEntry" scope="request">
<logic:present name="mapEntry">
<tr align="center">
<td><input type="checkbox" name="jobIds" group="jobs"
value="<bean:write name="mapEntry" property="key"/>"/></td></td>
<td><bean:write name="mapEntry" property="key"/></td>
<td><bean:write name="mapEntry" property="value"/></td>
<td> </td>
</tr>
</logic:present>
</logic:iterate>
How does one access the value of the map entry when it is not a simple type
like a String or int? I guess this is practical for other types as well
(ie. HashMap of Vectors, etc). Apologies ahead of time if this readily
apparent.
cheers,
Fred
*******************************************************************
Tokyo-Mitsubishi International plc ('TMI') is registered in
England, company number 1698498. TMI's registered
office is 6 Broadgate, London EC2M 2AA. TMI is a wholly
owned subsidiary of The Bank of Tokyo-Mitsubishi, Ltd
and is regulated by the Financial Services Authority.
This message is intended solely for the individual addressee
named above. The information contained in this E-Mail is
confidential and may be legally privileged. If you are not the
intended recipient please delete in its entirety. Messages
sent via this medium may be subject to delays, non-delivery
and unauthorised alteration.
The information contained herein or attached hereto has been obtained
from sources we believe to be reliable but we do not represent
that it is accurate or complete. Any reference to past performance
should not be taken as an indication of future performance.
The information contained herein or attached hereto is not to
be construed as an offer or solicitation to buy or sell any security,
instrument or investment.
TMI or any affiliated company, may have an interest, position,
or effect transactions, in any investment mentioned herein.
Any opinions or recommendations expressed herein are
solely those of the author or analyst and are subject to
change without notice.
********************************************************************
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]