I have a radiobutton list and would like to disable some items according to the outcome of a backing bean method.
<h:selectOneRadio value="#{managedBean.selectedItem}">
<f:selectItems value="#{managedBean.selectItems}"
var="x"
itemDisabled="#{managedBean.checkIncompatible(x)}" />
</h:selectOneRadio>
Is this the right way to do it? Meaning, will this code call checkIncompatible(x)
for each x
from the selectItems
list and set that item as enabled/disabled or just once and that's that?
I only managed to get all buttons to be either enabled or disabled and my suspicion is that the method only gets called once. Or that the rest of my code is not as perfect as I like to believe. And that would take a much longer question to fix.