Reputation: 5459
I have the following simple class which extends Checkbox and want to make it so that the Checkboxes default to unchecked upon creation. I tried calling setValue(false) in this class however the checkboxes are still defaulting to checked. Any help is appreciated
public final class ServerTaskCheckBox extends CheckBox {
private final ServerTask serverTask;
public ServerTaskCheckBox(ServerTask serverTask) {
super(serverTask.getCheckBoxLabel());
this.serverTask = serverTask;
setValue(false);
}
public ServerTask getServerTask() {
return serverTask;
}
}
Upvotes: 0
Views: 1091
Reputation: 131
The default value of a checkbox is false
/ unchecked. I assume that you have a setValue(true)
somewhere else in your code.
Upvotes: 5