I need to control rendering of menu tabs based on user permissions but have hit a snag when setting tab rendered property to false...
Code: Select all
<pa:tab title="Tab title" rendered="false">
The snag is that although the tab icon is not rendered as expected, when selecting the next rendered tab the hidden tab title is displayed. Furthermore the remaining tabs become associated with the following tab's content. This is actually easier to see in action than to explain, so to replicate modify atlantis-1.0.0.war demo and change line 11 of WEB-INF\menu.xhtml to
Code: Select all
<pa:tab icon="fa fa-cube" title="Features" rendered="false">
The work around is to ignore the rendered attribute and wrap pa:tab with
Code: Select all
<c:if test="..."><pa:tab icon="fa fa-cube" title="Features">...</pa:tab></c:if>
Thanks, Andrew