• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

nexted Iterate Tag syntax

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you consulted the Struts documentation?
 
Barun Saha
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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,
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic