JSTL tags are executed during view build time while JSF tags are executed during view render time.
You can visualize it as follows: Whenever a view tree get created for the first time, all JSTL tags are executed and the result is a view with only JSF tags. Whenever a view tree get rendered, all JSF tags get executed and the result is HTML. So: JSF+JSTL doesn't run in sync as you'd expect from the coding. JSTL runs from top to bottom first, hands the result to JSF and then it's JSF's turn to run from top to bottm again. This may lead to unexpected results in JSF iterating components like UIData
.
In a nut: Use JSTL to control flow of JSF result. Use JSF to control flow of HTML result.
That said, you can also use <f:verbatim>
if all you want to render conditionally is just HTML without any JSF component. It has less overhead than a <h:panelGroup>
.