This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "nexted Iterate Tag syntax" Watch "nexted Iterate Tag syntax" New topic

nexted Iterate Tag syntax

Barun Saha

Joined: Nov 10, 2003
Posts: 24
I have a login program which looks like this.

Tsheet t = new Tsheet(employee,payperiod);
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

Joined: Feb 05, 2003
Posts: 4727

Have you consulted the Struts documentation?

A good workman is known by his tools.
Barun Saha

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 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

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"/>

Please help.
wood burning stoves
subject: nexted Iterate Tag syntax
Similar Threads
double-entries in table
How to find selected Nodes of JTree used TreeListener any other way.
how comparator works?
h:selectOneMenu - setting the correct value
persistence not working