<h:selectOneMenu with conditional <f:selectItems shows options twice
<p>I want to use a selectOneMenu to have a user choose a value. In some cases I want to disable one of the values shown in the menu. I tried using render on both the selectItems as well as selectOneMenu as well as added a ui:fragment around the Menu but I always get all the values from both lists shown. Any ideas how to prevent that?
Here my current last try that again resulted in twice the list and the item in question once enabled and once disabled in it:</p>

<pre><code>&lt;ui:fragment rendered="#{cc.attrs.showP==true}"&gt;
    &lt;h:selectOneMenu id="type" binding="#{cc.type}"&gt;
        &lt;f:selectItems value="#{typeDAO.findAll()}"/&gt;
    &lt;/h:selectOneMenu&gt;
&lt;/ui:fragment&gt;
&lt;ui:fragment rendered="#{cc.attrs.showP==false}"&gt;
    &lt;h:selectOneMenu id="type" binding="#{cc.type}"&gt;
        &lt;f:selectItems value="#{typeDAO.findAll()}" var="item" itemDisabled="#{item=='P'}"/&gt;
    &lt;/h:selectOneMenu&gt;
&lt;/ui:fragment&gt;
</code></pre>