Revision f393241e
Added by Andreas Kohlbecker over 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/occurrence/CollectionPopupEditor.java | ||
---|---|---|
14 | 14 |
import com.vaadin.ui.TextField; |
15 | 15 |
|
16 | 16 |
import eu.etaxonomy.cdm.model.occurrence.Collection; |
17 |
import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction; |
|
18 |
import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.Action; |
|
19 | 17 |
import eu.etaxonomy.cdm.vaadin.event.CollectionEditorAction; |
20 | 18 |
import eu.etaxonomy.cdm.vaadin.event.ToOneRelatedEntityButtonUpdater; |
21 | 19 |
import eu.etaxonomy.cdm.vaadin.security.AccessRestrictedView; |
22 | 20 |
import eu.etaxonomy.cdm.vaadin.util.CdmTitleCacheCaptionGenerator; |
23 | 21 |
import eu.etaxonomy.vaadin.component.ToOneRelatedEntityCombobox; |
22 |
import eu.etaxonomy.vaadin.event.EditorActionType; |
|
24 | 23 |
import eu.etaxonomy.vaadin.mvp.AbstractCdmPopupEditor; |
25 | 24 |
|
26 | 25 |
/** |
... | ... | |
135 | 134 |
|
136 | 135 |
superCollectionCombobox = new ToOneRelatedEntityCombobox<Collection>("Super-collection", Collection.class); |
137 | 136 |
superCollectionCombobox.addClickListenerAddEntity(e -> getEventBus().publishEvent( |
138 |
new CollectionEditorAction(AbstractEditorAction.Action.ADD, null, superCollectionCombobox, this)
|
|
137 |
new CollectionEditorAction(EditorActionType.ADD, null, superCollectionCombobox, this)
|
|
139 | 138 |
)); |
140 | 139 |
superCollectionCombobox.addClickListenerEditEntity(e -> { |
141 | 140 |
if(superCollectionCombobox.getValue() != null){ |
142 | 141 |
getEventBus().publishEvent( |
143 | 142 |
new CollectionEditorAction( |
144 |
AbstractEditorAction.Action.EDIT,
|
|
143 |
EditorActionType.EDIT,
|
|
145 | 144 |
superCollectionCombobox.getValue().getId(), |
146 | 145 |
superCollectionCombobox, |
147 | 146 |
this) |
... | ... | |
160 | 159 |
|
161 | 160 |
superCollectionCombobox.addClickListenerAddEntity( e -> getEventBus().publishEvent( |
162 | 161 |
new CollectionEditorAction( |
163 |
Action.ADD,
|
|
162 |
EditorActionType.ADD,
|
|
164 | 163 |
null, |
165 | 164 |
superCollectionCombobox, |
166 | 165 |
this) |
... | ... | |
169 | 168 |
if(superCollectionCombobox.getValue() != null){ |
170 | 169 |
getEventBus().publishEvent( |
171 | 170 |
new CollectionEditorAction( |
172 |
Action.EDIT,
|
|
171 |
EditorActionType.EDIT,
|
|
173 | 172 |
superCollectionCombobox.getValue().getId(), |
174 | 173 |
superCollectionCombobox, |
175 | 174 |
this |
Also available in: Unified diff
ref #7204 refactoring editor events and introducing generic EntityEditorActionEvent