Hello,
My managed bean :
public List<String> getLiQuickNav(){
System.out.println("I'm here...");
List<String> l = new ArrayList<String>();
l.add("toto");
l.add("tata");
l.add("titi");
return l;
}
My forEach :
<c:forEach var="categorie" items="#{mainControleur.liQuickNav}">
<h:outputLabel value="${categorie}"/>
</c:forEach>
My output stream :
I'm here...
I'm here...
I'm here...
I'm here...
As you can see "getLiQuickNav( )" is call 4times by my ForEach. But I just wan't to call "getLiQuickNav( )" one time... How to call it just one time ?
Bonus question: Why "getLiQuickNav( )" is call 4time whereas I have only 3item "tata,titi,toto" ?
Thank's