Project

General

Profile

Revision 0b673f50

ID0b673f501cc879d2d09392dd973c153b17860dd8
Parent 29e04c71
Child 7b9ab0e4

Added by Andreas Kohlbecker almost 4 years ago

new TaxonEditorMode: requireNomenclaturalReference

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
144 144

  
145 145
        GridLayout grid = (GridLayout)getFieldLayout();
146 146
        // grid.setSizeFull();
147
        grid.setHideEmptyRowsAndColumns(true);
147 148
        grid.setSpacing(true);
148 149
        grid.setColumnExpandRatio(0, 0.3f);
149 150
        grid.setColumnExpandRatio(1, 0.3f);
......
381 382
        if(isModeEnabled(TaxonNamePopupEditorMode.nomenclaturalReferenceSectionEditingOnly) && getBean().getNomenclaturalReference() != null) {
382 383
            nomReferenceCombobox.setCaption("Selection limited to nomenclatural reference and sections");
383 384
        }
385
        if(isModeEnabled(TaxonNamePopupEditorMode.requireNomenclaturalReference)) {
386
            if(combinationAuthorshipField.getValue() == null){
387
                nomReferenceCombobox.setRequired(true);
388
            } else {
389
                combinationAuthorshipField.addValueChangeListener(e -> {
390
                    if(e.getProperty().getValue() == null){
391
                        nomReferenceCombobox.setRequired(true);
392
                    }
393
                });
394
            }
395
        }
384 396

  
385 397
    }
386 398

  
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditorMode.java
29 29
     * section can be edited via a ReferencePopupEditor.
30 30
     *
31 31
     */
32
    nomenclaturalReferenceSectionEditingOnly
32
    nomenclaturalReferenceSectionEditingOnly,
33

  
34
    /**
35
     * setting the nomenclatural reference is required with the exception
36
     * that existing data is considered complete if the combination
37
     * authors are set.
38
     */
39
    requireNomenclaturalReference
33 40

  
34 41
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)