Hello,
I have a problem with the behavior of the commandButton. I want it to
disable the comboBox when I click ones on it and I want it to enable the
comboBox when click on it again. The first part is working but the second
doesn't.
Here is the code
<h:selectOneMenu value="#{resumeBean.bgColor}"
disabled="#{!resumeBean.colorSupported}">
<f:selectItems value="#{resumeBean.availableColors}"/>
</h:selectOneMenu>
<h:commandButton value="#{resumeBean.colorSupportLabel}"
actionListener="#{
resumeBean.toggleColorSupport}"
immediate="true"/>
in the bean.
public void toggleColorSupport(ActionEvent event) {
isColorSupported = !isColorSupported;
}
public boolean isColorSupported() {
return (isColorSupported);
}
any idea why the second click on the button doesn't get trigger the listener
of the selectOneMenu?
Thank you
Franck