I am using uiComponents to create a new form, looking through the documentation I came up with this code:
case “CHK”:
List responseCheck = templateQuestion.getQuestion().getResponses();
CheckBoxGroup checkBoxResponse = uiComponents.create(CheckBoxGroup.class);
checkBoxResponse.setOptionsList(responseCheck);
checkBoxResponse.setCaption(templateQuestion.getQuestion().getLabel());
form.add(checkBoxResponse);
break;
I am getting an error:
Warning:(111, 61) Unchecked assignment: ‘com.haulmont.cuba.gui.components.RadioButtonGroup’ to ‘com.haulmont.cuba.gui.components.RadioButtonGroup<com.dynamoware.dynamoid.entity.Response>’
the code itself works, but it is inconsistent because of the unchecked assignment, but I can not seem to find a way to make it rin without errors.
I have another case which does not give me an error:
case “SEL”:
List responses = templateQuestion.getQuestion().getResponses();
LookupPickerField response = uiComponents.create(LookupPickerField.of(Response.class));
response.setOptionsList(responses);
response.setCaption(templateQuestion.getQuestion().getLabel());
form.add(response);
break;