I have something like this:
<ul>
<li>User</li>
<li>Admin</li>
..
</ul>
and want to render the list-item 'Admin' only if the actual User is in Role 'Admin'.
I know, I can do that like this:
<ul>
<li>User</li>
<h:panelGroup rendered="#{request.isUserInRole('admin')}">
<li>Admin</li>
</h:panelGroup>
..
</ul>
However the markup inserts a "span"-element because of h:panelGroup.
Is there a JSF-Component with a 'rendered'-property which does not insert any html?
Unfortunately, Facelets ui:remove/ui:include has not a 'rendered' property:
<ul>
<li>User</li>
<ui:remove rendered="#{request.isUserInRole('admin')}">
<li>Admin</li>
</ui:remove>
..
</ul>
How should I solve such a scenario?