Environment: Seam, Richfaces
The following code snippet causes the method getUsers to be called multiple times, how do I avoid this in my application so that it gets called only once.
<c:forEach items="#{userHome.getUsers()}" var="_user">
</c:forEach>
A rule of thumb is to avoid
<c:tags when using JSF (unless you are sure they work as expected)Here you’d better repllace it with:
(or
<ui:repeat>if using facelets)P.S. I guess
getUsers()is JBoss’ EL-extension, but I’d suggest not to use its extended features unless really needed.