Hi Kat
 
In my struts-config
 
   <action    path="/edittimesheet"
               type="org.teatimej.timesheet.EditTimeSheetAction"
               name="timesheetform"
      scope="session">
      <forward name="success"   path="/editconsultanttimesheetpage.jsp" />
    </action>
 
This is how I iterate through my arraylist in my jsp.
 
 <logic:iterate id="timerowlist" name="timesheetform"
   property="timeHeader.timeRow"
   type="org.teatimej.timesheet.dao.TimeRowView">
    <bean:write name="timerowlist" property="RowName"/>
</logic:iterate>
 
My timesheetform bean contains an attribute called timeHeader bean. Hence in my timesheetform bean I have the getter and setter methods (eg getTimeHeader(), setTimeHeader()) which access the TimeHeader Bean.
 
My TimeHeader bean contains an attribute of type java.util.ArrayList named TimeRow. I also added the getter and setter methods (eg getTimeRow() and setTimeRow())
 
The objects that I add to TimeRow are of type org.teatimej.timesheet.dao.TimeRowView.
 
Hope it helps.
 
 
----- Original Message -----
From: Luna, Kat
Sent: Tuesday, June 12, 2001 8:36 PM
Subject: RE: Displaying data retrieved from a database

Michael,
 
What exactly do you mean when you say "assign the arraylist"?  I believe I have all the beans in place to retrieve from the database and store in an arraylist, but when I try to iterate through the bean from the jsp page, I get "scope = null" which makes me think that I am missing this step of assigning the ArrayList to make it accessible to the JSP page.
 
Thanks,
 
Kat
 

Reply via email to