No, the typo was on my email not in the code.

-Nimmi

-----Original Message-----
From: Maya Muchnik [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 2:51 PM
To: [EMAIL PROTECTED]
Subject: Re: How do I iterate thru a hashtable using iterate tag?


Nimmi,

Check the properties names. In the working variant they are:
code, name, countryName. In the 2nd (not working variant) they are:
seq_nbr, name, country_name.
The second, maybe underscore sign is not allowed.
Maya

Shamdasani Nimmi-ANS004 wrote:

> Hi,
>
> Could someone please tell me what I am doing wrong below:
>
> user is a bean in session scope in my JSP and its getSuppliers() method returns a 
>hashtable where keys are Suppliers Ids and elements are Supplier beans.
>
> <logic:iterate collection="<%= user.getSuppliers() %>" id="supplier" 
>type="com.motorola.mms.msqc.beans.SupplierBean">
>
> <TR>
> <TD><bean:write name="supplier" property="seq_nbr" scope="page" /></TD>
> <TD><bean:write name="supplier" property="name" scope="page" /></TD>
> <TD><bean:write name="supplier" property="country_name" scope="page" /></TD>
> </TR>
>
> </logic:iterate>
>
> ------------------------------------------------------
> I had the following code earlier and that was working.
>
> <%
>         Hashtable hashTable = (Hashtable) user.getSuppliers();
>         for (Enumeration e = hashTable.elements(); e.hasMoreElements(); ) {
>         SupplierBean supplier = (SupplierBean) e.nextElement();
> %>
>
> <TR>
>
> <TD><%= supplier.getCode() %></FONT></TD>
> <TD><%= supplier.getName() %></TD>
> <TD><%= supplier.getCountryName() %></FONT></TD>
> </TR>
>
> <% } %>
>
> Thanks in advance.
>
> -Nimmi

Reply via email to