2 * Copyright (C) 2017 EDIT
3 * European Distributed Institute of Taxonomy
4 * http://www.e-taxonomy.eu
6 * The contents of this file are subject to the Mozilla Public License Version 1.1
7 * See LICENSE.TXT at the top of this package for the full license terms.
9 package eu
.etaxonomy
.vaadin
.mvp
;
11 import org
.springframework
.context
.event
.EventListener
;
13 import com
.vaadin
.data
.fieldgroup
.BeanFieldGroup
;
16 * @author a.kohlbecker
20 public abstract class AbstractEditorPresenter
<DTO
extends Object
> extends AbstractPresenter
{
22 @SuppressWarnings("unchecked")
24 public void onEditorSaveEvent(EditorSaveEvent saveEvent
){
25 // casting to BeanFieldGroup<DTO> must be possible here!
26 DTO bean
= ((BeanFieldGroup
<DTO
>)saveEvent
.getCommitEvent().getFieldBinder()).getItemDataSource().getBean();
30 protected abstract void saveBean(DTO bean
);