Revision acd5f27e
Added by Andreas Kohlbecker about 5 years ago
src/main/java/eu/etaxonomy/vaadin/component/WeaklyRelatedEntityCombobox.java | ||
---|---|---|
72 | 72 |
lazySelect.setValidationVisible(true); |
73 | 73 |
lazySelect.addValueChangeListener(e -> { |
74 | 74 |
// update the itemContainer immediately so that the edit button acts on the chosen item |
75 |
// TODO compare with ToOneRelatedEntityCombobox where getValue() is overwritten to call |
|
76 |
// commitSelect();; would this help in this class also? |
|
75 |
// TODO In contrast to ToOneRelatedEntityCombobox where getValue() is overwritten to call |
|
76 |
// commitSelect() calling this method would most probably remove all strings witch do not have a |
|
77 |
// weakly related entity. Such behavior would be very unfriendly to users. |
|
77 | 78 |
try { |
78 |
lazySelect.commit(); |
|
79 |
lazySelect.commit();
|
|
79 | 80 |
} catch (InvalidValueException ie){ |
80 | 81 |
/* Ignore here */ |
81 | 82 |
} |
... | ... | |
255 | 256 |
} |
256 | 257 |
} |
257 | 258 |
|
258 |
|
|
259 | 259 |
@Override |
260 | 260 |
public void setRequired(boolean required) { |
261 | 261 |
super.setRequired(required); |
... | ... | |
311 | 311 |
|
312 | 312 |
public WeaklyRelatedEntityButtonUpdater(WeaklyRelatedEntityCombobox<V> toOneRelatedEntityField){ |
313 | 313 |
this.toOneRelatedEntityField = toOneRelatedEntityField; |
314 |
String stringValue = toOneRelatedEntityField.getValue(); |
|
315 | 314 |
updateButtons(toOneRelatedEntityField.getValue()); |
316 | 315 |
toOneRelatedEntityField.setEditButtonEnabled(false); |
317 | 316 |
} |
Also available in: Unified diff
ref #8214 minor cleanup and improving a TODO comment