I have an h:selectBooleanCheckbox which I'd like to validate inside the managed bean before allowing it to change it's value.
<h:selectBooleanCheckbox id="attr" value="#{handler.attribute}" onclick="submit()"
immediate="true" valueChangeListener="#{handler.changeAttributeValue}" />
public String changeAttributeValue(ValueChangeEvent event) {
if(condition)
attribute=false;
return "home";
}
So what I'd like to do is prevent the attribute from becoming true if the condition is true. What happens is the attribute is set to false at first but after the method exits it becomes true again.