Thanks. This did not help me though..
cheers,
Amar..
-----Original Message-----
From: Mike Thompson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 26, 2001 3:01 PM
To: [EMAIL PROTECTED]
Subject: Re: iterate over a HashMap
Goto http://jakarta.apache.org/struts/struts-logic.html#iterate
--m
----- Original Message -----
From: "Nanduri, Amarnath" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, June 26, 2001 2:01 PM
Subject: iterate over a HashMap
>
> How do i iterate over a HashMap ? The key is a String but the value is an
> Object of a certain type (example .. com.agilquest.bean.DataBean ).
>
> I need to call a getter in the 'value i.e dataBean.getName() ;
>
> Below is the code i use...The value is calling the toString() of DataBean.
I
> need to call the getName() of DataBean. thanks a lot.
>
> cheers,
> Amar..
>
> <logic:iterate id="itemEntry" property="offerItems" name="someForm"
> scope="session" >
>
>
> <td valign="top"> <%-- show the key in the HashMap
> --%>
> <bean:write name="itemEntry"
> property="key"/>
>
> </td>
>
> <td valign="top"> <%-- show the value i.e DataBean
> and call its getName() --%>
> <bean:write name="itemEntry"
> property="value" />
> </td>
>
>
> </logic:iterate>