Project

General

Profile

« Previous | Next » 

Revision 6062e4a0

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
60 60
        discard(); // reload from property data source
61 61
    }
62 62

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

  
63 80

  
64 81
    /**
65 82
     * This method allows updating the value even if the equals check done

Also available in: Unified diff