If the list is in an available context you can just use the name attribute..

<%
        java.util.ArrayList myList = new ArrayList();
        myList.add("one");
        myList.add("two");
        
        pageContext.setAttribute("mylist",myList.toArray());

%>

<logic:iterate id="item" name="mylist">
        <bean:write name="item" />
</logic:iterate>


Cheers mark


On Sunday, August 3, 2003, at 07:06 AM, <[EMAIL PROTECTED]> wrote:


Hi list, I want to iterate over a number of rows from my database. I have removed most of my Javacode, but two statements remain. Any way I can get rid of those too?

<% BuchKatalog bk = new BuchKatalog(); %>
<ol>
<logic:iterate id="myBooks" collection="<%= bk.getBuecher()  %>">
   <li>
      <bean:write name="myBooks" property="titel"/>
   </li>
</logic:iterate>
</ol>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to