From 64680f8e535d69e9fcdeb75ded997f690372367f Mon Sep 17 00:00:00 2001 From: Carina Paul Date: Thu, 25 Jan 2024 17:56:15 +0200 Subject: [PATCH] #12902 - Delete the setDefault values from edit form --- .../java/de/symeda/sormas/ui/caze/CaseDataForm.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java index 3863c93448d..5da3a236fa1 100644 --- a/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java +++ b/sormas-ui/src/main/java/de/symeda/sormas/ui/caze/CaseDataForm.java @@ -1419,27 +1419,19 @@ public String getFormattedHtmlMessage() { }); } - private void hideJurisdictionFields() { - + private void hideAndFillJurisdictionFields() { getField(CaseDataDto.CASE_ORIGIN).setVisible(false); - getContent().getComponent(RESPONSIBLE_JURISDICTION_HEADING_LOC).setVisible(false); getContent().getComponent(PLACE_OF_STAY_HEADING_LOC).setVisible(false); differentPlaceOfStayJurisdiction.setVisible(false); responsibleRegion.setVisible(false); - responsibleRegion.setValue(FacadeProvider.getRegionFacade().getDefaultInfrastructureReference()); responsibleDistrict.setVisible(false); - responsibleDistrict.setValue(FacadeProvider.getDistrictFacade().getDefaultInfrastructureReference()); responsibleCommunity.setVisible(false); - responsibleCommunity.setValue(FacadeProvider.getCommunityFacade().getDefaultInfrastructureReference()); regionCombo.setVisible(false); - regionCombo.setValue(FacadeProvider.getRegionFacade().getDefaultInfrastructureReference()); districtCombo.setVisible(false); - districtCombo.setValue(FacadeProvider.getDistrictFacade().getDefaultInfrastructureReference()); communityCombo.setVisible(false); - communityCombo.setValue(FacadeProvider.getCommunityFacade().getDefaultInfrastructureReference()); } private void updateFacilityOrHome() { @@ -1726,7 +1718,7 @@ public void setValue(CaseDataDto newFieldValue) throws ReadOnlyException, Conver updateVisibilityDifferentPlaceOfStayJurisdiction(newFieldValue); if (UiUtil.enabled(FeatureType.HIDE_JURISDICTION_FIELDS)) { - hideJurisdictionFields(); + hideAndFillJurisdictionFields(); } // HACK: Binding to the fields will call field listeners that may clear/modify the values of other fields.