Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit e7d82a7

Browse files
BarnaBarthabarnabartha
andauthored
SORMAS-Foundation#2963 - make facilityOrGroup no longer nullable (SORMAS-Foundation#3328)
Co-authored-by: barnabartha <[email protected]>
1 parent 27ee4aa commit e7d82a7

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import com.vaadin.v7.ui.ComboBox;
5959
import com.vaadin.v7.ui.DateField;
6060
import com.vaadin.v7.ui.Field;
61+
import com.vaadin.v7.ui.OptionGroup;
6162
import com.vaadin.v7.ui.TextArea;
6263
import com.vaadin.v7.ui.TextField;
6364

@@ -223,7 +224,7 @@ public class CaseDataForm extends AbstractEditForm<CaseDataDto> {
223224
private CheckBox quarantineReduced;
224225
private CheckBox quarantineOrderedVerbally;
225226
private CheckBox quarantineOrderedOfficialDocument;
226-
private NullableOptionGroup facilityOrHome;
227+
private OptionGroup facilityOrHome;
227228
private ComboBox facilityTypeGroup;
228229
private ComboBox facilityType;
229230
private boolean quarantineChangedByFollowUpUntilChange = false;
@@ -434,7 +435,7 @@ protected void addFields() {
434435
ComboBox community = addInfrastructureField(CaseDataDto.COMMUNITY);
435436
community.setNullSelectionAllowed(true);
436437
community.addStyleName(SOFT_REQUIRED);
437-
facilityOrHome = new NullableOptionGroup(I18nProperties.getCaption(Captions.casePlaceOfStay), TypeOfPlace.getTypesOfPlaceForCases());
438+
facilityOrHome = new OptionGroup(I18nProperties.getCaption(Captions.casePlaceOfStay), TypeOfPlace.getTypesOfPlaceForCases());
438439
facilityOrHome.setId("facilityOrHome");
439440
facilityOrHome.setWidth(100, Unit.PERCENTAGE);
440441
CssStyles.style(facilityOrHome, ValoTheme.OPTIONGROUP_HORIZONTAL);
@@ -476,7 +477,7 @@ protected void addFields() {
476477
facility));
477478
facilityOrHome.addValueChangeListener(e -> {
478479
FieldHelper.removeItems(facility);
479-
if (TypeOfPlace.FACILITY.equals(facilityOrHome.getNullableValue())) {
480+
if (TypeOfPlace.FACILITY.equals(facilityOrHome.getValue())) {
480481

481482
// default values
482483
if (facilityTypeGroup.getValue() == null && !facilityTypeGroup.isReadOnly()) {

0 commit comments

Comments
 (0)