| Author |
nexted Iterate Tag syntax
|
Barun Saha
Greenhorn
Joined: Nov 10, 2003
Posts: 24
|
|
I have a login program which looks like this. Tsheet t = new Tsheet(employee,payperiod); request.setAttribute("timesheet",t); return (mapping.findForward("employee")); The Tsheet class has the following structure. public class Tsheet{ private Employee employee; private ArrayList days; Here days is an arraylist of object TimesheetDays with set'ers & getters defined in TimeSheetDays class. My question is how do I write the iterate tag on the Timesheet object to access days TimesheetDay looks like this private int holiday = 0; private int jury = 0; ...... with setJury() etc. Please help!!
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
|
Have you consulted the Struts documentation?
|
A good workman is known by his tools.
|
 |
Barun Saha
Greenhorn
Joined: Nov 10, 2003
Posts: 24
|
|
Yes I did & here's something I tried. [list<logic resent name="timesheet"> <logic:equal name="timesheet"> <nested:nest property="timesheet"> <nested:nest property="employee"> <logic:equal name="employee"> Department: <nested:text property-"department"/> </logic:equal> </nested:nest> </nested:nest> </logic:equal> </logic resent>[/list] The reason I added the <logic:equal is due the the error org.apache.jasper.JasperException: /employeeTrail.jsp(22,36) equal symbol expected I am not sure if the equal is needed. Here I am just trying to access the getDepartment() methord in the Employee object (in timesheet) Thanks in advance. [ April 19, 2005: Message edited by: Barun Saha ]
|
 |
Barun Saha
Greenhorn
Joined: Nov 10, 2003
Posts: 24
|
|
This is the code I have. The error I get is javax.servlet.ServletException: No getter method for property timesheet.employee.department of bean timesheet <nested:nest property="timesheet"> <nested:nest property="employee"> Department: <nested:text property="department"/> </nested:nest> </nested:nest> Please help. Thanks,
|
 |
 |
|
|
subject: nexted Iterate Tag syntax
|
|
|