Revision 3b66edef
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPopupEditor.java | ||
---|---|---|
20 | 20 |
import eu.etaxonomy.cdm.model.name.NameTypeDesignation; |
21 | 21 |
import eu.etaxonomy.cdm.model.name.TaxonName; |
22 | 22 |
import eu.etaxonomy.cdm.model.reference.Reference; |
23 |
import eu.etaxonomy.cdm.vaadin.event.TaxonNameEditorAction; |
|
23 | 24 |
import eu.etaxonomy.cdm.vaadin.util.converter.SetToListConverter; |
24 | 25 |
import eu.etaxonomy.vaadin.component.ToManyRelatedEntitiesComboboxSelect; |
25 | 26 |
import eu.etaxonomy.vaadin.component.ToOneRelatedEntityCombobox; |
27 |
import eu.etaxonomy.vaadin.event.EditorActionType; |
|
26 | 28 |
import eu.etaxonomy.vaadin.mvp.AbstractCdmPopupEditor; |
27 | 29 |
|
28 | 30 |
/** |
... | ... | |
134 | 136 |
row++; |
135 | 137 |
typeNameField = new ToOneRelatedEntityCombobox<TaxonName>("Type name", TaxonName.class); |
136 | 138 |
addField(typeNameField, "typeName", 0, row, 3, row); |
139 |
typeNameField.addClickListenerAddEntity(e -> getViewEventBus().publish( |
|
140 |
this, |
|
141 |
new TaxonNameEditorAction(EditorActionType.ADD, null, typeNameField, this)) |
|
142 |
); |
|
143 |
typeNameField.addClickListenerEditEntity(e -> { |
|
144 |
if(typeNameField.getValue() != null){ |
|
145 |
getViewEventBus().publish(this, |
|
146 |
new TaxonNameEditorAction( |
|
147 |
EditorActionType.EDIT, |
|
148 |
typeNameField.getValue().getId(), |
|
149 |
typeNameField, |
|
150 |
this) |
|
151 |
); |
|
152 |
} |
|
153 |
}); |
|
137 | 154 |
|
138 | 155 |
row++; |
139 | 156 |
typifiedNamesComboboxSelect = new ToManyRelatedEntitiesComboboxSelect<TaxonName>(TaxonName.class, "Typified names"); |
... | ... | |
196 | 213 |
public void setShowTypeFlags(boolean showTypeFlags) { |
197 | 214 |
this.showTypeFlags = showTypeFlags; |
198 | 215 |
} |
199 |
|
|
200 |
|
|
201 |
|
|
202 | 216 |
} |
Also available in: Unified diff
ref #6740 enabling typeName button in NameTypeDesignation editor and first changes to make delete working