aspose file tools*
The moose likes Struts and the fly likes nexted Iterate Tag syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "nexted Iterate Tag syntax" Watch "nexted Iterate Tag syntax" New topic
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: 4727

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,
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: nexted Iterate Tag syntax