I´m looking for a solution for my problem.
I have a table that needs to be like this.
--------------------------------------------------------------|
| | Title 3 |
Title 1 |Title 2|---------------------------------------------|
| | SubTitle 1 |SubTitle 2|SubTitle 3|SubTitle 4|
--------------------------------------------------------------|
| | | | | |
Val A1 | ValB1 | ValC1 | ValC1 | ValC1 | ValC1 |
| | | | | |
|-------|------------|----------|----------|----------|
| | | | | |
| ValB2 | ValC2 | ValC2 | ValC2 | ValC2 |
| | | | | |
--------------------------------------------------------------|
| | | | | |
| | | | | |
Val A2 | ValB3 | ValC3 | ValC3 | ValC3 | ValC3 |
| | | | | |
| | | | | |
----------------------------------------------------------------
My goal it´s to make a table appear like I did above.
I´m using JSF
and Primefaces 4.0
.
I have this struture of class.
Class Master {
private List<ClassA> classesA
// getter and setter
}
Class A {
private List<ClassB> classesB
// getter and setter and fields
}
Class B {
private List<ClassC> classesC
// getter and setter and fields
}
Class C {
// getter and setter and fields
}
So I tried to make with two datatables
or using ui:repeat
, but I don´t know what´s going to be the best choose. And the titles the owns like this.
Class A
have title 1
, Class B
have title 2
and Class C
have title 3
and subtitle 1,2,3 and 4.
Or use binding
.
To be more easier to understand I put a picture about how I need to create the table.
Can someone help me?
Thanks