Project

General

Profile

« Previous | Next » 

Revision 580d5157

Added by Andreas Kohlbecker about 5 years ago

ref #8050 validing related name nomenclatural reference to require the user to add missing references when reusing an exising name

View differences:

src/main/java/eu/etaxonomy/vaadin/component/ReloadableLazyComboBox.java
54 54
        discard(); // reload from property data source
55 55
    }
56 56

  
57
    /**
58
     * Calls {@link #reload()} but checks is the <code>bean</code> passed as
59
     * parameter has a different caption than the bean which is currently selected.
60
     *
61
     * Differences in the captions can occur for the same entity when the entity
62
     * has been modified through a popup edior.
63
     *
64
     * @param bean
65
     */
66
    public void reloadWith(T bean){
67
        boolean reapplyBean = getCaption(bean).equals(getCaption(getValue()));
68
        reload();
69
        if(reapplyBean){
70
            setValue(bean);
71
        }
72
    }
73

  
57 74

  
58 75
    /**
59 76
     * This method allows updating the value even if the equals check done

Also available in: Unified diff