I'm working on a Dynamic JSF page that read a List of lists. This list it`s load from a DataBase, then the number of elements can change.
I need to create one div for each of the elements in arrayList and then load the information on one table. (one div => one table)
(pseudocode jsp)
%
foreach(List Auxli: MainList){
int count=0;
<div id="count">
<table>
//information on auxLI
</table>
</div>
count = count+1;
}
%
I don't know how to get this work on JSF because I only have the <h:dataTable>
tag that read a object on Bean.
I read a object that contains the ArrayList, but I don't know who to cut to create the different Divs
Some one know how to do this?
Thanks to all
Finaly THE SOLUTION
The solution was use two <ui:repeat>
with a KeySET of elements. This is very important because "repeat" cant iterate MAPS!!
<ui:repeat value="#{main.MAP.keySet().toArray()}" var="item">
<DIV id=#{main.getNumber()}>
<ui:repeat value="#{main.MAP.get(item)}" var="item2">
</DIV>
</UI>
</UI>
The second repeat use the first element to take off from the list the information that we need. We get one div for each main element of the list and on the DIV we can use the information to make all you want!!! See you