I have two array lists. Employee List and Allocation List.
Each employee has allocation list.
Employee
class is as follows.
public class Employee {
private int id;
private String firstname;
private String lastname;
private List<Allocation> allocationList ;
// geters and setters
}
and Allocation
class is as follows
public class Allocation {
private int categoryId;
private String categoryName;
private float allocation;
// getters and setters
}
Lets say we have three allocation categories named X, Y and Z.
Each employee will have corresponding values for each of these categories.
Employee erik has X= 10, Y = 20 and Z = 67 and so on.
How do show employee details as well as these allocation per employee as shown in the figure below using display tag.
I do not want to use the nested table feature of display tag which allows to show nested lists as the nested lists are not exported in Display tag.
Ok. So I figured it out myself. Below is the working code.