Revision e5e64d18
Added by Andreas Kohlbecker about 6 years ago
src/main/java/eu/etaxonomy/cdm/vaadin/view/occurrence/CollectionEditorPresenter.java | ||
---|---|---|
21 | 21 |
import eu.etaxonomy.cdm.service.CdmFilterablePagingProvider; |
22 | 22 |
import eu.etaxonomy.cdm.vaadin.event.CollectionEditorAction; |
23 | 23 |
import eu.etaxonomy.cdm.vaadin.event.EditorActionTypeFilter; |
24 |
import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent; |
|
24 | 25 |
import eu.etaxonomy.cdm.vaadin.event.ToOneRelatedEntityReloader; |
25 | 26 |
import eu.etaxonomy.cdm.vaadin.security.UserHelper; |
26 | 27 |
import eu.etaxonomy.vaadin.mvp.AbstractCdmEditorPresenter; |
27 |
import eu.etaxonomy.vaadin.ui.view.DoneWithPopupEvent; |
|
28 |
import eu.etaxonomy.vaadin.ui.view.DoneWithPopupEvent.Reason; |
|
29 | 28 |
|
30 | 29 |
/** |
31 | 30 |
* @author a.kohlbecker |
... | ... | |
135 | 134 |
} |
136 | 135 |
|
137 | 136 |
@EventBusListenerMethod() |
138 |
public void onDoneWithPopupEvent(DoneWithPopupEvent event){
|
|
139 |
if(event.getPopup() == collectionPopuEditor){
|
|
140 |
if(event.getReason() == Reason.SAVE){
|
|
137 |
public void onEntityChangeEvent(EntityChangeEvent<?> event){
|
|
138 |
if(event.getSourceView() == collectionPopuEditor){
|
|
139 |
if(event.isCreateOrModifiedType()){
|
|
141 | 140 |
|
142 |
Collection newCollection = collectionPopuEditor.getBean();
|
|
141 |
Collection newCollection = (Collection) event.getEntity();
|
|
143 | 142 |
getCache().load(newCollection); |
144 | 143 |
getView().getSuperCollectionCombobox().getSelect().setValue(newCollection); |
145 | 144 |
} |
Also available in: Unified diff
ref #7344 updating presenter entity caches with beans modified in popup editors and refreshing teamOrPerson Fields (2)