Project

General

Profile

« Previous | Next » 

Revision c46954e3

Added by Andreas Kohlbecker almost 7 years ago

ref #6169 RelatedEntityListSelect (ToOneRelatedEntityField) edit and select working, add blocked by #6673

View differences:

src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java
46 46
import eu.etaxonomy.cdm.database.PermissionDeniedException;
47 47
import eu.etaxonomy.vaadin.component.NestedFieldGroup;
48 48
import eu.etaxonomy.vaadin.component.SwitchableTextField;
49
import eu.etaxonomy.vaadin.mvp.event.EditorPreSaveEvent;
50
import eu.etaxonomy.vaadin.mvp.event.EditorSaveEvent;
49 51
import eu.etaxonomy.vaadin.ui.view.DoneWithPopupEvent;
50 52
import eu.etaxonomy.vaadin.ui.view.DoneWithPopupEvent.Reason;
51 53

  
......
54 56
 * @since Apr 5, 2017
55 57
 *
56 58
 */
57
public abstract class AbstractPopupEditor<DTO extends Object, P extends AbstractEditorPresenter<DTO>>
59
public abstract class AbstractPopupEditor<DTO extends Object, P extends AbstractEditorPresenter<DTO, ? extends ApplicationView>>
58 60
    extends AbstractPopupView<P> {
59 61

  
60 62
    private BeanFieldGroup<DTO> fieldGroup;
......
476 478
    }
477 479

  
478 480
    public void showInEditor(DTO beanToEdit) {
481

  
479 482
        fieldGroup.setItemDataSource(beanToEdit);
480 483
        afterItemDataSourceSet();
481 484
    }
482 485

  
486
    /**
487
     * Returns the bean to be edited.
488
     *
489
     * @return
490
     */
491
    public DTO getBean() {
492
        return fieldGroup.getItemDataSource().getBean();
493
    }
494

  
483 495
    /**
484 496
     * This method is called after setting the item data source whereby the {@link FieldGroup#configureField(Field<?> field)} method will be called.
485 497
     * In this method all fields are set to default states defined for the fieldGroup.

Also available in: Unified diff