Suppose I want to bind disable property of a button with a checkbox's selected property. I know this method to bind them in FXML
:
<Button disable="${firstcheckbox.selected}"/>
But what if I have two checkboxes and I want to bind the button's disable property with both the checkbox's selected property. Yes, I know I can do that in my java controller but I was just wondering if there is a way to do that in FXML
.
If it's not clear what did I want, this is the Java code alternative to what I actually wanted:
mybutton.disableProperty().bind(firstcheckbox.selectedProperty().and(secondcheckbox.selectedProperty()));
Now I want to do this in FXML
instead.