How to conditionally render an f:selectItem tag?
The <f:selectItem> does not support the rendered attribute. Your closest bet is the itemDisabled attribute which still displays the item, but makes it unselectable. This is also supported in <f:selectItems>. In case of <p:selectOneMenu> you can then just add some CSS to hide disabled items. <p:selectOneMenu … panelStyleClass=”hideDisabled”> <f:selectItem itemValue=”1″ itemLabel=”one” /> <f:selectItem itemValue=”2″ itemLabel=”two” … Read more