<h:panelGroup rendered="#{myBean.xyz == 1}">
...
</h:panelGroup>
<h:panelGroup rendered="#{myBean.xyz != 1}">
...
</h:panelGroup>
This can be any UIComponent however. Every JSF HTML component supports the rendered attribute.
Good you mentioned it, Balus! I wish to know whether there is a better way how to work out the conditional building of a final page rather than using the rendered attribute. Is a templating framework like facelets the only viable solution in this case? Are there any other approaches to deal with situation where the rendered attribute comes to mind? Just asking for references so I won't repeat these rendered's - one to include when it's true and another to exclude when it's false.
Jacek