I have a one page Xhtml (JSF) that takes information from BD.This information is rendered on diferent divs that will be controlled with a List. Only one div can be show at same time and other must be hidden.
Itis very easy when you have static values, but now I dont know how to reffer the selected item and make actions with it.
pseudocode:
<script>
new array int [10];
int count=0;
</script>
//**list where you can select one item to show o hide DIV**
<ui:repeat value="categories"><li>ITEM</li></ui>
**//all divs with diferent ID**
<ui: repeat values ="main.categories" var="elements">
<div id="main.divNumberX()" hidden>
<script>
array[count]=main.getNumerDiv();
count=count+1;
</scrip>
<ui:repeat values=#{categories.get(element)} var=item>
#{item.getNombre} ...etc
</ui>
</div>
</ui>
$(document).ready(function() {
//I dont know how to do here ....
});
I think to use an array that keep the number and the position but im not abble to take of the information from the Eventclick. ¿Someone know can I do this?
Thanks to all!!!