Thanks - worked like a charm!
 
I have another question now:
 
I am now trying to setup my list so it alternates row backgrounds as it writes the list.  Below is how I can do it with scriplets, but I'd rather use Struts to do this - any ideas?
 

<%
int rowNum = 0;
%>
<logic:iterate id="list" name="beans">
<%
rowNum++;
                           
// Set tdClassName for different colored rows
String tdClassName = "";
if ((rowNum % 2) > 0) {
    tdClassName = "tableRowNormal";
} else {
    tdClassName = "tableRowAlternate";
}
%>
<tr>
    <td class="<%=tdClassName%>"><bean:write name="list" property="name"/></td>
    <td class="<%=tdClassName%>"><bean:write name="list" property="description"/></td>
    <td class="<%=tdClassName%>"><bean:write name="list" property="status"/></td>
</logic:iterate>
</tr>

 

----- Original Message -----
Sent: Thursday, June 07, 2001 10:39 AM
Subject: Re: Is this possible with Struts?

This calls getLastName() on each object in the list.

<logic:iterate id="results" name="myList">
   <bean:write name="results" property="lastName"/><br>

</logic:iterate>

  Matt Raible <[EMAIL PROTECTED]> wrote:

I have an iteration of Beans and I want to list through the iteration,
extract the beans and get the properties on each bean. Is this possible?

Example code:



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Do You Yahoo!?
Yahoo! Mail Personal Address - Get email at your own domain with Yahoo! Mail.

Reply via email to