commit 033ef2092e6ad516756533b164cf0d12d09eb85e
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Fri Aug 25 11:12:44 2017 +0200

    ref #6595 Fix composite cascade

diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/MultiPageTaxonEditorDataChangeBehaviourE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/MultiPageTaxonEditorDataChangeBehaviourE4.java
deleted file mode 100644
index 2822c28df..000000000
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/MultiPageTaxonEditorDataChangeBehaviourE4.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/**
-* Copyright (C) 2007 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-
-package eu.etaxonomy.taxeditor.editor.e4;
-
-import java.util.Vector;
-
-import org.apache.log4j.Logger;
-
-import eu.etaxonomy.cdm.model.name.TaxonName;
-import eu.etaxonomy.cdm.model.taxon.Synonym;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeEvent.EventType;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.model.AbstractDataChangeBehaviour;
-import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
-
-/**
- * Implementation if {@link eu.etaxonomy.taxeditor.store.model.IDataChangeBehaviour}
- * for the {@link eu.etaxonomy.taxeditor.editor.MultiPageTaxonEditor}.
- *
- * TODO make this class a bean and thus configurable by Spring
- *
- * @author pplitzner
- * @date Aug 24, 2017
- *
- */
-public class MultiPageTaxonEditorDataChangeBehaviourE4 extends AbstractDataChangeBehaviour implements
-		IDataChangeBehavior {
-	private static final Logger logger = Logger
-			.getLogger(MultiPageTaxonEditorDataChangeBehaviourE4.class);
-
-	private MultiPageTaxonEditorE4 source;
-
-	private TaxonEditorInputE4 input;
-
-	public MultiPageTaxonEditorDataChangeBehaviourE4(
-	        MultiPageTaxonEditorE4 multiPageTaxonEditor) {
-		source = multiPageTaxonEditor;
-	}
-
-	/** {@inheritDoc} */
-	@Override
-    public void reactOnDataChange(CdmDataChangeMap changeEvents) {
-		input = source.getEditorInput();
-
-		// I don't know when this happens but ...
-		if(input.getTaxon() == null) {
-            return;
-        }
-
-		if(changeEvents.sizeByEventType(EventType.UPDATE) > 0){
-			reactOnUpdate(changeEvents.getEvents(EventType.UPDATE));
-		}
-		if(changeEvents.sizeByEventType(EventType.INSERT) > 0){
-			reactOnInsert(changeEvents.getEvents(EventType.INSERT));
-		}
-		if(changeEvents.sizeByEventType(EventType.DELETE) > 0){
-			reactOnDelete(changeEvents.getEvents(EventType.DELETE));
-		}
-	}
-
-
-	/** {@inheritDoc} */
-	//we do not really need this anymore as closing the editors is
-	//now run before the delete operation in DeleteHandler
-	@Override
-	public void reactOnDelete(Vector<CdmDataChangeEvent> events){
-		for(CdmDataChangeEvent event : events){
-			// close open editors
-			if((event.getEntity() instanceof TaxonNode)
-					&& input.getTaxonNode().equals(event.getEntity())){
-				//EditorUtil.close(source);
-				logger.debug("Closing open editor for deleted taxon."); //$NON-NLS-1$
-			}
-		}
-	}
-
-	/** {@inheritDoc} */
-	@Override
-	public void reactOnUpdate(Vector<CdmDataChangeEvent> events){
-
-		for(CdmDataChangeEvent event : events){
-
-			// update editor title
-			if(event.getEntity() instanceof TaxonName){
-				if(input.getTaxon().getName().equals(event.getEntity())){
-					// set the name of the editor window
-					source.setPartName();
-					logger.debug("Updating title of taxons editor."); //$NON-NLS-1$
-				}
-			}
-			// TODO other stuff to happen
-
-		}
-	}
-
-	/** {@inheritDoc} */
-	@Override
-	public void reactOnInsert(Vector<CdmDataChangeEvent> events){
-		boolean doRedraw = false;
-		for(CdmDataChangeEvent event : events){
-			// refresh on synonym changes
-			if(input.getTaxon().hasSynonyms() && event.getEntity() instanceof Synonym){
-				Synonym synonym = (Synonym) event.getEntity();
-
-				if(synonym.isSynonymOf(input.getTaxon())){
-					doRedraw = true;
-					break;
-				}
-			}
-		}
-	}
-}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/MultiPageTaxonEditorE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/MultiPageTaxonEditorE4.java
deleted file mode 100644
index 9b9368919..000000000
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/MultiPageTaxonEditorE4.java
+++ /dev/null
@@ -1,452 +0,0 @@
-/**
- * Copyright (C) 2007 EDIT
- * European Distributed Institute of Taxonomy
- * http://www.e-taxonomy.eu
- *
- * The contents of this file are subject to the Mozilla Public License Version 1.1
- * See LICENSE.TXT at the top of this package for the full license terms.
- */
-
-package eu.etaxonomy.taxeditor.editor.e4;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.UUID;
-
-import javax.annotation.PreDestroy;
-import javax.inject.Inject;
-
-import org.eclipse.core.commands.operations.IUndoContext;
-import org.eclipse.core.commands.operations.UndoContext;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.e4.ui.di.Focus;
-import org.eclipse.e4.ui.di.Persist;
-import org.eclipse.e4.ui.model.application.ui.MDirtyable;
-import org.eclipse.e4.ui.workbench.modeling.ESelectionService;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.jface.viewers.ISelectionChangedListener;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.PartInitException;
-
-import eu.etaxonomy.cdm.api.application.CdmApplicationState;
-import eu.etaxonomy.cdm.api.application.CdmChangeEvent;
-import eu.etaxonomy.cdm.api.application.CdmChangeEvent.Action;
-import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
-import eu.etaxonomy.cdm.api.conversation.IConversationEnabled;
-import eu.etaxonomy.cdm.model.common.CdmBase;
-import eu.etaxonomy.cdm.model.name.TaxonName;
-import eu.etaxonomy.cdm.model.taxon.Taxon;
-import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.cdm.model.taxon.TaxonRelationship;
-import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
-import eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage;
-import eu.etaxonomy.taxeditor.editor.ISecuredEditor;
-import eu.etaxonomy.taxeditor.editor.ITaxonEditor;
-import eu.etaxonomy.taxeditor.editor.internal.TaxeditorEditorPlugin;
-import eu.etaxonomy.taxeditor.editor.l10n.Messages;
-import eu.etaxonomy.taxeditor.editor.name.TaxonNameEditor;
-import eu.etaxonomy.taxeditor.editor.name.container.AbstractGroupedContainer;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
-import eu.etaxonomy.taxeditor.model.DataChangeBridge;
-import eu.etaxonomy.taxeditor.model.IDataChangeBehavior;
-import eu.etaxonomy.taxeditor.model.IDirtyMarkable;
-import eu.etaxonomy.taxeditor.model.IPartContentHasDetails;
-import eu.etaxonomy.taxeditor.model.IPartContentHasFactualData;
-import eu.etaxonomy.taxeditor.model.IPartContentHasMedia;
-import eu.etaxonomy.taxeditor.model.IPartContentHasSupplementalData;
-import eu.etaxonomy.taxeditor.model.MessagingUtils;
-import eu.etaxonomy.taxeditor.operation.IPostOperationEnabled;
-
-/**
- *
- * @author pplitzner
- * @date Aug 24, 2017
- *
- */
-public class MultiPageTaxonEditorE4
-        implements IPartContentHasFactualData, IConversationEnabled, IPostOperationEnabled, IDirtyMarkable,
-        IPartContentHasDetails, IPartContentHasSupplementalData, ISecuredEditor, IPartContentHasMedia, ITaxonEditor {
-
-    /** Constant <code>ID="eu.etaxonomy.taxeditor.editor.taxon"{trunked}</code> */
-    public static final String ID = "eu.etaxonomy.taxeditor.editor.taxon"; //$NON-NLS-1$
-
-    private ConversationHolder conversation;
-    private IDataChangeBehavior dataChangeBehavior;
-    private IUndoContext undoContext;
-
-    private TaxonEditorInputE4 input;
-
-    @Inject
-    private ESelectionService selService;
-
-    @Inject
-    private MDirtyable dirty;
-
-    private ISelectionChangedListener selectionChangedListener;
-
-
-    @Inject
-    public MultiPageTaxonEditorE4() {
-        undoContext = new UndoContext();
-
-    }
-
-    /** {@inheritDoc} */
-    @PreDestroy
-    public void dispose() {
-        input.dispose();
-        conversation.unregisterForDataStoreChanges(this);
-        conversation.close();
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    protected void addPages() {
-        input = getEditorInput();
-        conversation = input.getConversationHolder();
-        conversation.registerForDataStoreChanges(this);
-
-        try {
-            addPage(Page.NAME.getIndex(), new TaxonNameEditor(this),
-                    getEditorInput());
-
-        } catch (PartInitException e) {
-            MessagingUtils.error(getClass(), e);
-        }
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    @Override
-    protected void pageChange(int newPageIndex) {
-        if(getCurrentPage()==-1){
-            return;
-        }
-        super.pageChange(newPageIndex);
-    }
-
-    /** {@inheritDoc} */
-    @Persist
-    public void doSave(IProgressMonitor monitor) {
-        monitor.beginTask(Messages.MultiPageTaxonEditor_SAVING_EDITOR, 4);
-        try {
-            if (!conversation.isBound()) {
-                conversation.bind();
-            }
-            monitor.worked(1);
-
-            for (IEditorPart editorPage : getPages()) {
-                if (editorPage instanceof TaxonNameEditor) {
-                    if (((TaxonNameEditor) editorPage).checkForEmptyNames()) {
-                        MessageDialog.openWarning(AbstractUtility.getShell(), Messages.MultiPageTaxonEditor_NO_NAME_SPECIFIED,
-                                Messages.MultiPageTaxonEditor_NO_NAME_SPECIFIED_MESSAGE);
-                        return;
-                    }
-                }
-
-                editorPage.doSave(monitor);
-                monitor.worked(1);
-            }
-
-            // commit the conversation and start a new transaction immediately
-
-            input.merge();
-
-            conversation.commit(true);
-            CdmApplicationState.getCurrentDataChangeService()
-            .fireChangeEvent(new CdmChangeEvent(Action.Update, input.getTaxonNode() , MultiPageTaxonEditorE4.class), true);
-            monitor.worked(1);
-
-            this.setDirty(false);
-            monitor.worked(1);
-        } catch (Exception e) {
-            setFocus();
-            MessagingUtils.operationDialog(this, e, TaxeditorEditorPlugin.PLUGIN_ID,Messages.MultiPageTaxonEditor_SAVING_TAXON, Messages.MultiPageTaxonEditor_SAVING_TAXON_MESSAGE);
-            disableEditor(true);
-        } finally {
-            monitor.done();
-        }
-    }
-
-    private void disableEditor(boolean isOnError) {
-        for (IMultiPageTaxonEditorPage editorPage : getPages()) {
-            if(isOnError){
-                editorPage.setOnError();
-            }else {
-                editorPage.setDisabled();
-            }
-        }
-
-        conversation.unregisterForDataStoreChanges(this);
-        conversation.close();
-        setDirty(false);
-    }
-
-    private void setDirty(boolean dirty) {
-        this.dirty.setDirty(dirty);
-    }
-
-    public boolean isDirty() {
-        return dirty.isDirty();
-    }
-
-    public void init(IEditorInput input)
-            throws PartInitException {
-
-        if (!(input instanceof TaxonEditorInputE4)) {
-            throw new PartInitException(
-                    Messages.MultiPageTaxonEditor_INVALID_INPUT);
-        }
-
-        this.input = (TaxonEditorInputE4) input;
-        setPartName();
-    }
-
-    /**
-     * Calls <code>MultiPageEditorPart.setPartName(String partName)</code> with
-     * text appropriate to the state of the taxon: any taxon that has been saved
-     * will by necessity have a name to display; a new taxon should display
-     * "New taxon" in the editor tab.
-     */
-    protected void setPartName() {
-
-        String partName = null;
-        TaxonName name = getTaxon().getName();
-
-        if (name != null) {
-            partName = name.getTitleCache();
-        }
-
-        if (partName == null || partName.equals("")) { //$NON-NLS-1$
-            partName = (Messages.MultiPageTaxonEditor_NEW_TAXON);
-        }
-
-        //FIXME E4 migrate
-//        setPartName(partName);
-    }
-
-    /**
-     * {@inheritDoc}
-     *
-     * Editor pages call this in their postOperation to notify the
-     * MultiPageTaxonEditor of unsaved changes
-     */
-    @Override
-    public void changed(Object element) {
-        // setDirty(true);
-        // if the attribute is null then do not set the dirty flag -> hotfix for the problem that for tasks done in service methods the changes are saved automatically
-        if (element != null){
-            setDirty(true);
-        }
-
-        if (element instanceof TaxonBase) {
-            TaxonNameEditor page = (TaxonNameEditor) getPage(Page.NAME);
-            AbstractGroupedContainer container = page.getContainer((TaxonBase) element);
-            if (container != null) {
-                container.refresh();
-            }
-        }
-        if (element instanceof TaxonRelationship) {
-            TaxonNameEditor page = (TaxonNameEditor) getPage(Page.NAME);
-            AbstractGroupedContainer container = page.getContainer(((TaxonRelationship) element).getFromTaxon());
-            if (container != null) {
-                container.refresh();
-            }
-        }
-        //refresh part title
-        //TODO: refresh taxon node in taxon navigator
-        setPartName();
-    }
-
-    @Override
-    public void forceDirty() {
-        changed(null);
-    }
-
-    /**
-     * The accepted taxon that is the input for this editor
-     *
-     * @return the accepted taxon
-     */
-    @Override
-    public Taxon getTaxon() {
-        return input.getTaxon();
-    }
-
-    @Override
-    public ConversationHolder getConversationHolder() {
-        return conversation;
-    }
-
-    public void setConversationHolder(ConversationHolder conversation) {
-        this.conversation = conversation;
-    }
-
-    public IUndoContext getUndoContext() {
-        return undoContext;
-    }
-
-    public void setUndoContext(IUndoContext undoContext) {
-        this.undoContext = undoContext;
-    }
-
-    /** {@inheritDoc} */
-    @Focus
-    public void setFocus() {
-        // logger.warn("Setting focus to editor");
-        // bind the conversation
-        getConversationHolder().bind();
-        input.bind();
-        // pass focus to the active editor page
-        //FIXME E4 migrate
-//        getActiveEditor().setFocus();
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void update(CdmDataChangeMap events) {
-        if (dataChangeBehavior == null) {
-            dataChangeBehavior = new MultiPageTaxonEditorDataChangeBehaviourE4(this);
-        }
-
-        DataChangeBridge.handleDataChange(events, dataChangeBehavior);
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public boolean postOperation(CdmBase objectAffectedByOperation) {
-    		setDirty(true);
-
-        for (IEditorPart editor : this.getPages()) {
-            if (editor instanceof IPostOperationEnabled) {
-                ((IPostOperationEnabled) editor).postOperation(objectAffectedByOperation);
-            } else {
-                MessagingUtils.warn(getClass(), Messages.MultiPageTaxonEditor_POST_OP_NOT_ENABLED + editor);
-            }
-        }
-        MessagingUtils.warn(getClass(), Messages.MultiPageTaxonEditor_POST_OP_CALLED);
-
-        return false;
-    }
-
-    /**
-     * Returns an <code>IEditorPart</code> implementation by type
-     *
-     * @param page
-     *            the page type
-     * @return a {@link eu.etaxonomy.taxeditor.editor.IMultiPageTaxonEditorPage}
-     *         object.
-     */
-    public IMultiPageTaxonEditorPage getPage(Page page) {
-        for (IEditorPart editor : this.getPages()) {
-            if (editor.getClass().equals(page.getClazz())) {
-                return (IMultiPageTaxonEditorPage) editor;
-            }
-        }
-        return null;
-    }
-
-    /**
-     * Return a list of <code>AbstractTaxonEditor</code>s registered with this
-     * <code>MultiPageTaxonEditor</code>.
-     *
-     * @return a {@link java.util.List} object.
-     */
-    public List<IMultiPageTaxonEditorPage> getPages() {
-        ArrayList<IMultiPageTaxonEditorPage> editors = new ArrayList<IMultiPageTaxonEditorPage>();
-        for (int i = 0; i < this.getPageCount(); i++) {
-
-            editors.add((IMultiPageTaxonEditorPage) this.getEditor(i));
-        }
-        return editors;
-    }
-
-    /**
-     * Refreshes a certain page of the MultipageTaxonEditor
-     *
-     * @param page
-     *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
-     * @return a boolean.
-     */
-    public boolean redraw(Page page) {
-        return redraw(page, true);
-    }
-
-    /**
-     * Refreshes a certain page of the MultipageTaxonEditor and sets focus to
-     * that page
-     *
-     * @param page
-     *            a {@link eu.etaxonomy.taxeditor.editor.Page} object.
-     * @param focus
-     *            a boolean.
-     * @return a boolean.
-     */
-    public boolean redraw(Page page, boolean focus) {
-        IMultiPageTaxonEditorPage editorPage = getPage(page);
-        return editorPage != null && editorPage.redraw(focus);
-    }
-
-    /**
-     * <p>
-     * onComplete
-     * </p>
-     *
-     * @return a boolean.
-     */
-    @Override
-    public boolean onComplete() {
-        return false;
-    }
-
-    /**
-     * Reloads the data for this
-     */
-    public void reload() {
-        if (isDirty()) {
-            MessagingUtils.warningDialog(Messages.MultiPageTaxonEditor_UNSAVED_DATA, getClass(), Messages.MultiPageTaxonEditor_UNSAVED_DATA_MESSAGE);
-        } else {
-            TaxonEditorInputE4 input = getEditorInput();
-
-            UUID uuid = input.getTaxonNode().getUuid();
-
-            conversation.clear();
-
-            try {
-                TaxonEditorInputE4 newInput = TaxonEditorInputE4.NewInstance(uuid);
-                setInput(newInput);
-                for (IMultiPageTaxonEditorPage editorPart : getPages()) {
-                    editorPart.redraw();
-                }
-            } catch (Exception e) {
-                MessagingUtils.messageDialog(Messages.MultiPageTaxonEditor_REFRESH_ERROR, getClass(), Messages.MultiPageTaxonEditor_REFRESH_ERROR_MESSAGE, e);
-            }
-        }
-    }
-
-    @Override
-    public String toString() {
-        return String.format("%s[%s]", this.getClass().getSimpleName(), getEditorInput()); //$NON-NLS-1$
-    }
-
-    @Override
-    public boolean permissionsSatisfied() {
-        IEditorPart activeEditor = getActiveEditor();
-        if(activeEditor != null && ISecuredEditor.class.isAssignableFrom(activeEditor.getClass())){
-            return ((ISecuredEditor)activeEditor).permissionsSatisfied();
-        }
-        return true;
-    }
-
-    @Override
-    public boolean canAttachMedia() {
-        return true;
-    }
-
-    public TaxonEditorInputE4 getEditorInput() {
-        return input;
-    }
-
-}
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
index b832c5fa5..5be63c703 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/TaxonNameEditorE4.java
@@ -106,6 +106,9 @@ public class TaxonNameEditorE4 implements
 	private List<HomotypicalSynonymGroupE4> heterotypicSynonymGroups = new ArrayList<>();
 	private MisappliedGroupE4 misappliedGroup;
 
+	//FIXME E4 migrate dnd
+//	private DropTarget target;
+
 	private ISelectionService selectionService;
 
 	private TaxonBase objectAffectedByLastOperation;
@@ -138,7 +141,7 @@ public class TaxonNameEditorE4 implements
             return;
         }
 
-		createManagedForm(parent);
+        createManagedForm(parent);
 
 		//propagate selection
         selectionChangedListener = (event -> selService.setSelection(AbstractUtility.getElementsFromSelectionChangedEvent(event)));
@@ -207,6 +210,7 @@ public class TaxonNameEditorE4 implements
 
 		// Redraw composite
 		managedForm.reflow(true);
+		managedForm.refresh();
 	}
 
 	public Taxon getTaxon() {
@@ -383,6 +387,17 @@ public class TaxonNameEditorE4 implements
         setFocus();
 	}
 
+	//FIXME E4 migrate drag support
+//   private void createDragSupport() {
+//       // Listen for names being dragged outside of existing homotypic groups -
+//       // user wants to create a new group
+//       Transfer[] types = new Transfer[] { CdmDataTransfer.getInstance() };
+//       int operations = DND.DROP_MOVE;
+//       if (target == null) {
+//           target = new DropTarget(parent, operations);
+//           target.setTransfer(types);
+//           target.addDropListener(new NameEditorDropTargetListener(this));
+//       }
 
 	public AcceptedNameContainerE4 getAcceptedNameContainer() {
 		return getAcceptedGroup().getAcceptedNameContainer();
@@ -477,6 +492,21 @@ public class TaxonNameEditorE4 implements
 				: getAcceptedNameContainer();
 	}
 
+	//FIXME E4 migrate drag n drop
+//    @Override
+//    public void dragEntered() {
+//        // TODO change this
+//        getControl().setBackground(
+//                AbstractUtility.getColor(Resources.COLOR_DRAG_ENTER));
+//    }
+//
+//    @Override
+//    public void dragLeft() {
+//        getControl().setBackground(
+//                AbstractUtility.getColor(Resources.COLOR_COMPOSITE_BACKGROUND));
+//    }
+
+
 	public void setMisapplicationsGroup(MisappliedGroupE4 misappliedGroup) {
 		this.misappliedGroup = misappliedGroup;
 	}
@@ -568,7 +598,7 @@ public class TaxonNameEditorE4 implements
 				groupedContainer.setBackground(background);
 			}
 		}
-		managedForm.getForm().setBackground(background);
+		getControl().setBackground(background);
 	}
 
     @Override
@@ -588,4 +618,8 @@ public class TaxonNameEditorE4 implements
         return null;
     }
 
+    public Composite getControl(){
+        return managedForm.getForm().getBody();
+    }
+
 }
diff --git a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupE4.java b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupE4.java
index da149bce1..84768d596 100644
--- a/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupE4.java
+++ b/eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/e4/container/AbstractGroupE4.java
@@ -66,7 +66,7 @@ public abstract class AbstractGroupE4 implements IDropTargetableE4{
 	}
 
 	protected void createControl() {
-		control = editor.getToolkit().createComposite(editor.getManagedForm().getForm());
+		control = editor.getToolkit().createComposite(editor.getControl());
 
 		control.setLayoutData(new TableWrapData(TableWrapData.FILL_GRAB));
 		TableWrapLayout layout = new TableWrapLayout();
