@@ -156,6 +156,8 @@ public class PathogenTestForm extends AbstractEditForm<PathogenTestDto> {
156156 private Disease disease ;
157157 private TextField typingIdField ;
158158 private ComboBox specieField ;
159+ private ComboBox genoTypingCB ;
160+ private TextField genoTypingResultTextTF ;
159161 // List of tests that are used for serogrouping
160162
161163 public PathogenTestForm (
@@ -315,6 +317,13 @@ public void setValue(PathogenTestDto newFieldValue) throws ReadOnlyException, Co
315317 }
316318 typingIdField .setValue (newFieldValue .getTypingId ());
317319 specieField .setValue (newFieldValue .getSpecie ());
320+ if (!genoTypingCB .isReadOnly ()) {
321+ genoTypingCB .setValue (newFieldValue .getGenoTypeResult ());
322+ // We only set the genotyping result text if the genotyping result is not read only
323+ if (!genoTypingResultTextTF .isReadOnly ()) {
324+ genoTypingResultTextTF .setValue (newFieldValue .getGenoTypeResultText ());
325+ }
326+ }
318327 drugSusceptibilityField .forceUpdateDrugSusceptibilityFields ();
319328 markAsDirty ();
320329 }
@@ -389,9 +398,9 @@ protected void addFields() {
389398 diseaseVariantField .setCaption (I18nProperties .getCaption (Captions .PathogenTest_rsv_testedDiseaseVariant ));
390399 diseaseVariantDetailsField .setCaption (I18nProperties .getCaption (Captions .PathogenTest_rsv_testedDiseaseVariantDetails ));
391400 }
392- ComboBox genoTypingCB = addField (PathogenTestDto .GENOTYPE_RESULT , ComboBox .class );
401+ genoTypingCB = addField (PathogenTestDto .GENOTYPE_RESULT , ComboBox .class );
393402 genoTypingCB .setVisible (true );
394- TextField genoTypingResultTextTF = addField (PathogenTestDto .GENOTYPE_RESULT_TEXT , TextField .class );
403+ genoTypingResultTextTF = addField (PathogenTestDto .GENOTYPE_RESULT_TEXT , TextField .class );
395404 genoTypingResultTextTF .setVisible (true );
396405
397406 ComboBox testedPathogenField = addCustomizableEnumField (PathogenTestDto .TESTED_PATHOGEN );
0 commit comments