Q:

Update of a conditionally rendered selectItem not working

I'm wondering why updating a form won't update a conditionally rendered selectItem. The commandButton (for testing purposes) is updated correctly as expected. 
<h:form id="form">
    <h:selectOneMenu id="selectedGroupId" label="#{msgs.group_group}" value="#{groupBean.selectedGroupId}">
        <p:ajax event="change" listener="#{groupBean.selectGroupEvent}" update=":form"/>
        <f:selectItem rendered="#{empty groupBean.selectedGroupId}" itemLabel="#{msgs.global_select_select}" />
        <f:selectItems value="#{groupBean.availableGruppen}" />
   </h:selectOneMenu>
   <p:commandButton value="Test" actionListener="#{groupBean.test}" rendered="#{empty groupBean.selectedGroupId}"/> 
</h:form>

Any hints what I'm doing wrong here?
Thanks
Jonny

A:

There is no rendered attribute for f:selectItem. 
According to this answer, you can use a <c:if> as a wrapper instead or modify your list of f:selecItems in your action method.

