Revision d7ad25d9
Added by Katja Luther over 2 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/vocabulary/MeasurementUnitCollectionElement.java | ||
---|---|---|
48 | 48 |
@Override |
49 | 49 |
public void createControls(ICdmFormElement element, int style) { |
50 | 50 |
comboMeasurementUnit = formFactory.createDefinedTermComboElementDto(TermType.MeasurementUnit, element, "Measurement unit", null, style); |
51 |
if (entity != null){ |
|
52 |
setEntity(entity); |
|
53 |
} |
|
51 | 54 |
} |
52 | 55 |
|
53 | 56 |
@Override |
54 | 57 |
public void setEntity(MeasurementUnit entity) { |
55 | 58 |
this.entity = entity; |
56 |
if(entity.getId()!=0){ |
|
59 |
if(entity.getId()!=0 && comboMeasurementUnit != null){
|
|
57 | 60 |
comboMeasurementUnit.setSelection(entity); |
58 | 61 |
comboMeasurementUnit.removeEmptyElement(); |
59 | 62 |
} |
Also available in: Unified diff
ref #9838: change order of ui element creation and setting entity in collection elements