This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
In our application we have action classes like this:
class TaskActionForm +String taskId +String taskName +ArrayList subTasks
The ArrayList 'subTasks' contains SubTaskActionForm instances
class SubTaskActionForm +String subTaskId +String subTaskName
The JSP gets an ArrayList of TaskActionForms. My objective is to iterate through the ArrayList to print the task details. If a task has subtasks then I need to get the ArrayList of subtasks and print them too.
I am new to struts and am confused on how to achieve this with nested <logic:iterate>. Can someone help me? Thanks.
Joined: Aug 06, 2003
Hey.. I have managed to do it. I am posting it here for the benefit of newbies like me: