<% LabelValueBean[] lvArray = new LabelValueBean[] { new LabelValueBean("label1", "value1"), new LabelValueBean("label2", "value2"), new LabelValueBean("label3", "value3"), new LabelValueBean("label4", "value4") }; request.setAttribute("lvArray", lvArray); %> <logic:iterate name="lvArray" id="row" indexId="rowIndex" type="org.apache.struts.util.LabelValueBean"> <bean:write name="rowIndex"/> - <bean:write name="row" property="label"/> - <bean:write name="row" property="value"/><BR> </logic:iterate>
> -----Original Message----- > From: e-denton Java Programmer [mailto:[EMAIL PROTECTED] > Sent: Wednesday, December 24, 2003 10:24 AM > To: Struts Users Mailing List > Subject: Easy question: iterate > > > Sorry to bother you with an easy question, but I can't find > the answer. > > I want to iterate over Category_VO[] which is stored in a > session attribute. > I read that it can be done, but I can't find an example for > raw arrays. > > Here's what I have (which probably doesn't even make sense): > > <logic:iterate > id="category" > collection="com.cnw.portal.database.Category_VO" > type="com.cnw.portal.database.Category_VO" > scope="session"> > <p> <bean:write name="category" property="shortTitle"/> > </logic:iterate> > > > Thanks! > > will --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]