Revision b4127a93
Added by Andreas Kohlbecker almost 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java | ||
---|---|---|
527 | 527 |
private void updateFieldVisibility() { |
528 | 528 |
|
529 | 529 |
// TODO use getField() instead and remove field references |
530 |
|
|
531 |
TaxonNameDTO taxonName = getBean(); |
|
532 |
Rank rank = taxonName.getRank(); |
|
530 |
Rank rank = (Rank) rankSelect.getValue(); |
|
533 | 531 |
|
534 | 532 |
boolean isSpeciesOrBelow = !rank.isHigher(Rank.SPECIES()); |
535 | 533 |
Boolean withBasionym = BooleanUtils.isTrue(basionymToggle.getValue()); |
536 | 534 |
Boolean withValidation = BooleanUtils.isTrue(validationToggle.getValue()); |
537 | 535 |
|
536 |
specificEpithetField.setVisible(isSpeciesOrBelow); |
|
537 |
infraSpecificEpithetField.setVisible(rank.isInfraSpecific()); |
|
538 |
infraGenericEpithetField.setVisible(rank.isInfraGeneric()); |
|
539 |
|
|
540 |
|
|
538 | 541 |
basionymAuthorshipField.setVisible(withBasionym != null && withBasionym); |
539 | 542 |
exBasionymAuthorshipField.setVisible(withBasionym); |
540 | 543 |
basionymsComboboxSelect.setVisible(withBasionym); |
Also available in: Unified diff
fix #7385 TaxonNameEditor adapts field visibility to rank