How to conditionally render plain HTML elements like s?
The right JSF component to represent a HTML <div> element is the <h:panelGroup> with the layout attribute set to block. So, this should do: <h:panelGroup layout=”block” … rendered=”#{someCondition}”> … </h:panelGroup> Alternatively, wrap it in an <ui:fragment>: <ui:fragment rendered=”#{someCondition}”> <div> … </div> </ui:fragment> Or when you’re already on JSF 2.2+, make it a passthrough element: <div … Read more