Revision 218b286e
Added by Andreas Kohlbecker over 4 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java | ||
---|---|---|
454 | 454 |
|
455 | 455 |
// --------------- ReplacedSynonyms |
456 | 456 |
row++; |
457 |
replacedSynonymsComboboxSelect = new ToManyRelatedEntitiesComboboxSelect<TaxonName>(TaxonName.class, "Replaced synonyms");
|
|
457 |
replacedSynonymsComboboxSelect = new ToManyRelatedEntitiesComboboxSelect<TaxonName>(TaxonName.class, "Replaced synonym"); |
|
458 | 458 |
replacedSynonymsComboboxSelect.setConverter(new SetToListConverter<TaxonName>()); |
459 | 459 |
addField(replacedSynonymsComboboxSelect, "replacedSynonyms", 0, row, 3, row); |
460 | 460 |
replacedSynonymsComboboxSelect.setWidth(100, Unit.PERCENTAGE); |
... | ... | |
475 | 475 |
|
476 | 476 |
// --------------- Validation |
477 | 477 |
row++; |
478 |
validationField = new NameRelationField("Validation", "Validated name", Direction.relatedTo, NameRelationshipType.VALIDATED_BY_NAME());
|
|
478 |
validationField = new NameRelationField("Validation of", "Designation", Direction.relatedTo, NameRelationshipType.VALIDATED_BY_NAME());
|
|
479 | 479 |
validationField.setWidth(100, Unit.PERCENTAGE); |
480 | 480 |
ToOneRelatedEntityCombobox<TaxonName> validatedNameComboBox = validationField.getRelatedNameComboBox(); |
481 | 481 |
validatedNameComboBox.addClickListenerAddEntity(e -> getViewEventBus().publish( |
src/main/java/eu/etaxonomy/vaadin/component/NameRelationField.java | ||
---|---|---|
51 | 51 |
|
52 | 52 |
private CssLayout toolBar= new CssLayout(); |
53 | 53 |
|
54 |
private Button removeButton = ButtonFactory.REMOVE_ITEM.createButton();
|
|
54 |
private Button removeButton = ButtonFactory.REMOVE_ALL_ITEMS.createButton();
|
|
55 | 55 |
|
56 |
private Button newButton = ButtonFactory.ADD_ITEM.createButton();
|
|
56 |
private Button newButton = ButtonFactory.CREATE_NEW.createButton();
|
|
57 | 57 |
|
58 | 58 |
private BeanFieldGroup<NameRelationshipDTO> fieldGroup = new BeanFieldGroup<>(NameRelationshipDTO.class); |
59 | 59 |
|
... | ... | |
87 | 87 |
setPrimaryStyleName(PRIMARY_STYLE); |
88 | 88 |
|
89 | 89 |
if(nameFieldCaption == null){ |
90 |
this.nameFieldCaption = "Related name";
|
|
90 |
nameFieldCaption = "Related name"; |
|
91 | 91 |
} |
92 |
this.nameFieldCaption = nameFieldCaption; |
|
92 | 93 |
|
93 | 94 |
relatedNameComboBox = new ToOneRelatedEntityCombobox<TaxonName>(this.nameFieldCaption, TaxonName.class); |
94 | 95 |
citatonComboBox = new ToOneRelatedEntityCombobox<Reference>("Reference", Reference.class); |
... | ... | |
218 | 219 |
|
219 | 220 |
private void updateToolBarButtonStates(){ |
220 | 221 |
boolean hasValue = getValue() != null; |
221 |
removeButton.setEnabled(hasValue);
|
|
222 |
newButton.setEnabled(!hasValue);
|
|
222 |
removeButton.setVisible(hasValue);
|
|
223 |
newButton.setVisible(!hasValue);
|
|
223 | 224 |
} |
224 | 225 |
|
225 | 226 |
/** |
Also available in: Unified diff
fix #8014 improving lables related to validation and replaced basionyms, fixing labeling issue in NameRelationField and harmonizing add/remove button