Project

General

Profile

Revision db262dfa

IDdb262dfa73bbc4f60e98b397b7986f05eefa6de6
Parent b14494a9
Child 8d788122

Added by Andreas Kohlbecker about 2 years ago

fix #7855 preventing nomenclaturalTitle from being changed in PersonField without user interaction

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/component/common/PersonField.java
356 356
    @Override
357 357
    public void commit() throws SourceException, InvalidValueException {
358 358

  
359
        String lastNomenclaturalTitle = null;
360
        if(getValue() != null){
361
           lastNomenclaturalTitle = getValue().getNomenclaturalTitle();
362
        }
359 363
        super.commit();
360 364

  
361 365
        Person bean =  getValue();
362 366

  
363
        if(bean != null){
367
        if(bean != null && !isReadOnly()){
364 368
            String nomTitle = nomenclaturalTitleField.getValue();
365
            if(nomTitle != null && nomTitle.equals(titleCacheField.getValue())){
369
            if(nomTitle != null && nomTitle != lastNomenclaturalTitle && nomTitle.equals(titleCacheField.getValue())){
366 370
                // no point having a nomenclaturalTitle if it is equal to the titleCache
367 371
                bean.setNomenclaturalTitle(null);
368 372
            }

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)