Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

nexted Iterate Tag syntax

 
Barun Saha
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you consulted the Struts documentation?
 
Barun Saha
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic