I’ve been trying to accomplish something with 3 checkboxes, that need to function like a radio button list, only look horizontal, like in the picture below.
The problem is that whenever i tick an unchecked checkbox, it jumps right back to the default checked one (granularCB ), and it also doesn’t do the logic either. I also need them to be immediate.
public void buttonClick(ClickEvent event) {
if (granularCB.booleanValue()) {
granularCB.setValue(isGranular = true);
singularCB.setValue(isSingular = false);
uniqueCB.setValue(isUnique = false);
} else if (singularCB.booleanValue()) {
granularCB.setValue(isGranular = false);
singularCB.setValue(isSingular = true);
uniqueCB.setValue(isUnique = false);
} else if (uniqueCB.booleanValue()) {
granularCB.setValue(isGranular = false);
singularCB.setValue(isSingular = false);
uniqueCB.setValue(isUnique = true);
}
EDIT: It kind of works if i untick the currently ticked checkbox before i tick another, but that’s not how it’s supposed to run.