I have the code that creates a CheckBoxGroup
(based on Vaadin 8 Sampler):
public void setPossibleAnswers(List <String> answerOptions) {
answerCheckBoxes = new CheckBoxGroup<>("", answersOptions);
}
I'm using this method to select given items in a group:
public void setAnswer(String answer) {
String[] answers = answer.split(",");
answerCheckBoxes.select(answers);
}
But this code selects only the first element of the array. What I need is to select all elements. Does any body know where is my mistake?