In the code below when #{bean.renderPanel1} evaluates to false the method in the ui:repeat is still called.
- Is this the expected behavior?
- Is there a way to prevent this call from happening. For example, using something other than
h:panelGroupbut notc:if
<h:panelGroup id="panel1" rendered="#{bean.renderPanel1}">
<ui:repeat value="#{bean.panelOneItems}" var="item">
</ui:repeat>
</h:panelGroup>
Yes, this is fully expected behaviour. It will only not be called when the rendered attribute evaluates to
false.