use of de.symeda.sormas.api.person.CauseOfDeath in project SORMAS-Project by hzi-braunschweig.
the class PersonEditFragment method setCauseOfDeathDetailsFieldVisibility.
private static void setCauseOfDeathDetailsFieldVisibility(final ControlPropertyField causeOfDeathField, final ControlPropertyField causeOfDeathDiseaseField, final ControlPropertyField causeOfDeathDetailsField) {
CauseOfDeath selectedCauseOfDeath = (CauseOfDeath) causeOfDeathField.getValue();
Disease selectedCauseOfDeathDisease = (Disease) causeOfDeathDiseaseField.getValue();
if (selectedCauseOfDeath == CauseOfDeath.OTHER_CAUSE) {
causeOfDeathDetailsField.setVisibility(VISIBLE);
causeOfDeathDetailsField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.CAUSE_OF_DEATH_DETAILS));
} else if (selectedCauseOfDeathDisease == Disease.OTHER) {
causeOfDeathDetailsField.setVisibility(VISIBLE);
causeOfDeathDetailsField.setCaption(I18nProperties.getPrefixCaption(PersonDto.I18N_PREFIX, PersonDto.CAUSE_OF_DEATH_DISEASE_DETAILS));
} else {
causeOfDeathDetailsField.setVisibility(GONE);
}
}
Aggregations