commit ae69029fdb060770bd05a8c3cf578541bf01daf9
Author: Andreas Kohlbecker <a.kohlbecker@bgbm.org>
Date:   Tue Nov 6 11:11:56 2018 +0100

    fix #7846 editor context information shown as breadcrumbs in the toolbar of popup editors

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java
index 59d4f36a..8d780f3f 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEditorAction.java
@@ -117,38 +117,4 @@ public abstract class AbstractEditorAction<V> extends AbstractEntityEvent<Editor
         return context;
     }
 
-    public static class EditorActionContext {
-
-        Object parentEntity;
-
-        AbstractView parentView;
-
-        /**
-         * @param parentEntity
-         * @param parentView
-         */
-        public EditorActionContext(Object parentEntity, AbstractView parentView) {
-            super();
-            this.parentEntity = parentEntity;
-            this.parentView = parentView;
-        }
-
-        /**
-         * @return the parentEntity
-         */
-        public Object getParentEntity() {
-            return parentEntity;
-        }
-
-        /**
-         * @return the parentView
-         */
-        public AbstractView getParentView() {
-            return parentView;
-        }
-
-
-
-    }
-
 }
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContext.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContext.java
new file mode 100644
index 00000000..d87349d5
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContext.java
@@ -0,0 +1,75 @@
+/**
+* Copyright (C) 2018 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.cdm.vaadin.event;
+
+import com.vaadin.ui.Field;
+
+import eu.etaxonomy.vaadin.mvp.AbstractPopupEditor;
+import eu.etaxonomy.vaadin.mvp.AbstractView;
+import eu.etaxonomy.vaadin.util.PropertyIdPath;
+
+public class EditorActionContext {
+
+    Object parentEntity;
+
+    AbstractView parentView;
+
+    /**
+     * The field in the parent view to which the child view is related to.
+     */
+    Field<?> targetField;
+
+    /**
+     * @param parentEntity
+     * @param parentView
+     */
+    public EditorActionContext(Object parentEntity, AbstractView parentView) {
+        super();
+        this.parentEntity = parentEntity;
+        this.parentView = parentView;
+    }
+
+    /**
+     * TODO rename to getParentBean()
+     *
+     * @return the parentEntity
+     */
+    public Object getParentEntity() {
+        return parentEntity;
+    }
+
+    /**
+     * @return the parentView
+     */
+    public AbstractView getParentView() {
+        return parentView;
+    }
+
+    /**
+     * @param targetField
+     */
+    public void setTargetField(Field<?> targetField) {
+        this.targetField = targetField;
+    }
+
+    public Field<?> getTargetField() {
+        return targetField;
+    }
+
+    public PropertyIdPath getTargetPropertyIdPath(){
+        if(parentView instanceof AbstractPopupEditor && targetField != null){
+            return ((AbstractPopupEditor)getParentView()).boundPropertyIdPath(targetField);
+        } else {
+            return null;
+        }
+    }
+
+
+
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormat.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormat.java
new file mode 100644
index 00000000..954a85e4
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormat.java
@@ -0,0 +1,59 @@
+/**
+* Copyright (C) 2018 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.cdm.vaadin.event;
+
+public class EditorActionContextFormat {
+
+    public enum TargetInfoType {
+        PROPERTIES, FIELD_CAPTION;
+    }
+
+    /**
+     *
+     */
+    public boolean doClassName;
+    /**
+     *
+     */
+    public boolean doTargetInfo;
+    /**
+     *
+     */
+    public boolean classNameForMissingTargetData;
+    /**
+     *
+     */
+    public boolean doCreateOrNew;
+
+    /**
+     * The name of the html tag to be used
+     */
+    public String tagName = "span";
+
+    /**
+     * additional class attributes
+     */
+    public String classAttributes = "";
+
+    public TargetInfoType targetInfoType = TargetInfoType.PROPERTIES;
+
+
+    /**
+     *
+     */
+    public EditorActionContextFormat(boolean doClassName, boolean doProperties, boolean classNameForMissingPropertyPath,
+            boolean doCreateOrNew, TargetInfoType targetInfoType, String classAttributes) {
+        this.doClassName = doClassName;
+        this.doTargetInfo = doProperties;
+        this.classNameForMissingTargetData = classNameForMissingPropertyPath;
+        this.doCreateOrNew = doCreateOrNew;
+        this.targetInfoType = targetInfoType;
+        this.classAttributes = classAttributes;
+    }
+}
\ No newline at end of file
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormatter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormatter.java
new file mode 100644
index 00000000..b83bcf90
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/event/EditorActionContextFormatter.java
@@ -0,0 +1,123 @@
+/**
+* Copyright (C) 2018 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.cdm.vaadin.event;
+
+import java.util.Stack;
+
+import org.apache.commons.lang3.StringUtils;
+
+import com.vaadin.ui.Component;
+
+import eu.etaxonomy.cdm.model.common.CdmBase;
+import eu.etaxonomy.cdm.ref.TypedEntityReference;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContextFormat.TargetInfoType;
+import eu.etaxonomy.cdm.vaadin.model.CdmEntityAdapterDTO;
+import eu.etaxonomy.vaadin.mvp.AbstractPopupEditor;
+import eu.etaxonomy.vaadin.util.PropertyIdPath;
+
+/**
+ * @author a.kohlbecker
+ * @since Oct 29, 2018
+ *
+ */
+public class EditorActionContextFormatter {
+
+    private static final String NEW = "New";
+
+    private static final String EDIT = "Edit";
+
+    public String format(EditorActionContext cntxt, EditorActionContextFormat format) {
+
+        String className = null;
+        String targetInfo = null;
+        String createOrNew = null;
+
+        Object parentEntity = cntxt.getParentEntity();
+
+        if (parentEntity != null) {
+            if (parentEntity instanceof TypedEntityReference) {
+                className = ((TypedEntityReference) cntxt.getParentEntity()).getType().getSimpleName();
+                createOrNew = EDIT;
+            } else if (CdmEntityAdapterDTO.class.isAssignableFrom(parentEntity.getClass())) {
+                CdmBase cdmEntity = ((CdmEntityAdapterDTO) parentEntity).cdmEntity();
+                className = cdmEntity.getClass().getSimpleName();
+                createOrNew = cdmEntity.isPersited() ? EDIT : NEW;
+            } else if (CdmBase.class.isAssignableFrom(parentEntity.getClass())) {
+                CdmBase cdmEntity = ((CdmBase) parentEntity);
+                className = cdmEntity.getClass().getSimpleName();
+                createOrNew = cdmEntity.isPersited() ? EDIT : NEW;
+            } else {
+                className = parentEntity.getClass().getSimpleName();
+                // can not decide for createOrNew in this case
+            }
+        } else {
+            className += "[NULL_CLASS]";
+        }
+
+        if (format.doTargetInfo && cntxt.getParentView() != null && AbstractPopupEditor.class.isAssignableFrom(cntxt.getParentView().getClass())) {
+            // the top element is the cntxt istself!! we need to dig one step deeper to get the previous popup editor
+            // TODO chaining the EditorActionContext would ease find the contexts of parent editors
+            Stack<EditorActionContext> ctxtStack = ((AbstractPopupEditor)cntxt.getParentView()).getEditorActionContext();
+            int parentPopupPos = ctxtStack.size() - 2;
+            if(parentPopupPos > -1){
+                EditorActionContext parentCtx = ctxtStack.get(parentPopupPos);
+                if(format.targetInfoType.equals(TargetInfoType.PROPERTIES)){
+                    PropertyIdPath propertyIdPath = parentCtx.getTargetPropertyIdPath();
+                    if (propertyIdPath != null) {
+                        targetInfo = propertyIdPath.toString();
+                    }
+                } else {
+                    // TargetInfoType.FIELD_CAPTION
+                    if(parentCtx.getTargetField() != null){
+                        Component captionComponent = parentCtx.getTargetField();
+                        while(captionComponent != null){
+                            targetInfo = captionComponent.getCaption();
+                            if(targetInfo != null){
+                                break;
+                            }
+                            captionComponent = captionComponent.getParent();
+                        }
+                    }
+                }
+            }
+        }
+
+        // create output
+        String markup = "";
+
+        if (format.doCreateOrNew && createOrNew != null) {
+            markup += "<" + format.tagName + " class=\"operation " + format.classAttributes + "\">" + createOrNew + "</" + format.tagName + ">";
+        }
+
+        if (format.doTargetInfo) {
+            if(targetInfo == null && format.classNameForMissingTargetData && className != null){
+                targetInfo = className;
+            }
+            if(targetInfo != null){
+                if(!markup.isEmpty()){
+                    markup += " ";
+                    targetInfo = normalizeTargetInfo(targetInfo);
+                }
+                markup += "<" + format.tagName + " class=\"target " + format.classAttributes + "\">" + targetInfo + "</" + format.tagName + ">";
+            }
+        }
+        return markup;
+    }
+
+    /**
+     * @param targetInfo
+     * @return
+     */
+    public String normalizeTargetInfo(String targetInfo) {
+        targetInfo = StringUtils.join(StringUtils.splitByCharacterTypeCamelCase(targetInfo), " ");
+        targetInfo = targetInfo.toLowerCase();
+        return targetInfo;
+    }
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
index acf82918..e896c2aa 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/name/TaxonNamePopupEditor.java
@@ -555,7 +555,7 @@ public class TaxonNamePopupEditor extends AbstractCdmDTOPopupEditor<TaxonNameDTO
             updateAuthorshipFields();
         }
         if(isModeEnabled(TaxonNamePopupEditorMode.NOMENCLATURALREFERENCE_SECTION_EDITING_ONLY) && getBean().getNomenclaturalReference() != null) {
-            nomReferenceCombobox.setCaption("Selection limited to nomenclatural reference and parts of it.");
+            nomReferenceCombobox.setDescription("Selection limited to nomenclatural reference and parts of it.");
         }
         if(isModeEnabled(TaxonNamePopupEditorMode.REQUIRE_NOMENCLATURALREFERENCE)) {
             if(combinationAuthorshipField.getValue() == null){
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
index ea16f6ba..6202c7b5 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorkingsetPresenter.java
@@ -72,7 +72,7 @@ import eu.etaxonomy.cdm.vaadin.component.CdmBeanItemContainerFactory;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationItem;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStatusFieldInstantiator;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStatusSelect;
-import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.EditorActionContext;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContext;
 import eu.etaxonomy.cdm.vaadin.event.EditorActionTypeFilter;
 import eu.etaxonomy.cdm.vaadin.event.EntityChangeEvent;
 import eu.etaxonomy.cdm.vaadin.event.ReferenceEditorAction;
@@ -428,7 +428,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
         }
 
         TaxonNamePopupEditor popup = openPopupEditor(TaxonNamePopupEditor.class, event);
-        popup.setParentEditorActionContext(event.getContext());
+        popup.setParentEditorActionContext(event.getContext(), event.getTarget());
         popup.withDeleteButton(true);
         TaxonNamePopupEditorConfig.configureForNomenclaturalAct(popup);
         popup.loadInEditor(event.getEntityUuid());
@@ -451,7 +451,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
         if(newNameForRegistrationPopupEditor == null){
             TaxonNamePopupEditor popup = openPopupEditor(TaxonNamePopupEditor.class, event);
             newNameForRegistrationPopupEditor = popup;
-            popup.setParentEditorActionContext(event.getContext());
+            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
             popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE,CRUD.DELETE));
             popup.withDeleteButton(true);
             popup.setCdmEntityInstantiator(new BeanInstantiator<TaxonName>() {
@@ -581,7 +581,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
 
         if(event.getWorkingSetType() == TypeDesignationWorkingSetType.SPECIMEN_TYPE_DESIGNATION_WORKINGSET ){
             SpecimenTypeDesignationWorkingsetPopupEditor popup = openPopupEditor(SpecimenTypeDesignationWorkingsetPopupEditor.class, event);
-            popup.setParentEditorActionContext(event.getContext());
+            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
             popup.withDeleteButton(true);
             popup.loadInEditor(new TypeDesignationWorkingsetEditorIdSet(event.getRegistrationUuid(), event.getBaseEntityRef()));
             if(event.hasSource()){
@@ -590,7 +590,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
             }
         } else {
             NameTypeDesignationPopupEditor popup = openPopupEditor(NameTypeDesignationPopupEditor.class, event);
-            popup.setParentEditorActionContext(event.getContext());
+            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
             popup.withDeleteButton(true);
             popup.loadInEditor(new TypeDesignationWorkingsetEditorIdSet(event.getRegistrationUuid(), event.getBaseEntityRef()));
 
@@ -614,7 +614,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
 
         if(event.getWorkingSetType() == TypeDesignationWorkingSetType.SPECIMEN_TYPE_DESIGNATION_WORKINGSET){
             SpecimenTypeDesignationWorkingsetPopupEditor popup = openPopupEditor(SpecimenTypeDesignationWorkingsetPopupEditor.class, event);
-            popup.setParentEditorActionContext(event.getContext());
+            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
             TypeDesignationWorkingsetEditorIdSet identifierSet;
             UUID typifiedNameUuid;
 
@@ -642,7 +642,7 @@ public class RegistrationWorkingsetPresenter extends AbstractPresenter<Registrat
             }
         } else {
             NameTypeDesignationPopupEditor popup = openPopupEditor(NameTypeDesignationPopupEditor.class, event);
-            popup.setParentEditorActionContext(event.getContext());
+            popup.setParentEditorActionContext(event.getContext(), event.getTarget());
             popup.withDeleteButton(true);
             popup.grantToCurrentUser(EnumSet.of(CRUD.UPDATE, CRUD.DELETE));
             RegistrationDTO regDto = workingset.getRegistrationDTO(event.getRegistrationUuid()).get();
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorksetViewBean.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorksetViewBean.java
index 29d8059f..2bb7179e 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorksetViewBean.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/registration/RegistrationWorksetViewBean.java
@@ -66,7 +66,7 @@ import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationItemsPanel;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStatusFieldInstantiator;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStatusLabel;
 import eu.etaxonomy.cdm.vaadin.component.registration.RegistrationStyles;
-import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.EditorActionContext;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContext;
 import eu.etaxonomy.cdm.vaadin.event.RegistrationEditorAction;
 import eu.etaxonomy.cdm.vaadin.event.ShowDetailsEvent;
 import eu.etaxonomy.cdm.vaadin.event.TaxonNameEditorAction;
diff --git a/src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java b/src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java
index 9166ea01..e4b94ff6 100644
--- a/src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java
+++ b/src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPopupEditor.java
@@ -29,6 +29,7 @@ import com.vaadin.data.fieldgroup.FieldGroup.FieldGroupInvalidValueException;
 import com.vaadin.server.AbstractErrorMessage.ContentMode;
 import com.vaadin.server.ErrorMessage.ErrorLevel;
 import com.vaadin.server.FontAwesome;
+import com.vaadin.server.GenericFontIcon;
 import com.vaadin.server.UserError;
 import com.vaadin.shared.ui.MarginInfo;
 import com.vaadin.ui.AbstractComponentContainer;
@@ -58,8 +59,9 @@ import com.vaadin.ui.themes.ValoTheme;
 
 import eu.etaxonomy.cdm.database.PermissionDeniedException;
 import eu.etaxonomy.cdm.vaadin.component.TextFieldNFix;
-import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction;
-import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.EditorActionContext;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContext;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContextFormat;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContextFormatter;
 import eu.etaxonomy.vaadin.component.NestedFieldGroup;
 import eu.etaxonomy.vaadin.component.SwitchableTextField;
 import eu.etaxonomy.vaadin.event.FieldReplaceEvent;
@@ -106,6 +108,8 @@ public abstract class AbstractPopupEditor<DTO extends Object, P extends Abstract
 
     private CssLayout toolBarButtonGroup = new CssLayout();
 
+    private Label contextBreadcrumbsLabel = new Label();
+
     private Label statusMessageLabel = new Label();
 
     Set<String> statusMessages = new HashSet<>();
@@ -139,6 +143,10 @@ public abstract class AbstractPopupEditor<DTO extends Object, P extends Abstract
 
         toolBar.addStyleName(ValoTheme.WINDOW_TOP_TOOLBAR);
         toolBar.setWidth(100, Unit.PERCENTAGE);
+        contextBreadcrumbsLabel.setId("context-breadcrumbs");
+        contextBreadcrumbsLabel.setWidthUndefined();
+        contextBreadcrumbsLabel.setContentMode(com.vaadin.shared.ui.label.ContentMode.HTML);
+        toolBar.addComponent(contextBreadcrumbsLabel);
         toolBarButtonGroup.addStyleName(ValoTheme.LAYOUT_COMPONENT_GROUP);
         toolBarButtonGroup.setWidthUndefined();
         toolBar.addComponent(toolBarButtonGroup);
@@ -718,6 +726,43 @@ public abstract class AbstractPopupEditor<DTO extends Object, P extends Abstract
         statusMessageLabel.addStyleName(ValoTheme.LABEL_COLORED);
     }
 
+    private void updateContextBreadcrumbs() {
+
+        List<EditorActionContext> contextInfo = new ArrayList<>(getEditorActionContext());
+        String breadcrumbs = "";
+        EditorActionContextFormatter formatter = new EditorActionContextFormatter();
+
+        GenericFontIcon operationPrefixIcon = new GenericFontIcon("IcoMoon", 0xe902);
+        GenericFontIcon operationSuffxIcon = new GenericFontIcon("IcoMoon", 0xe901);
+
+        int cnt = 0;
+        for(EditorActionContext cntxt : contextInfo){
+            cnt++;
+            boolean isLast = cnt == contextInfo.size();
+            boolean isFirst = cnt == 1;
+
+            boolean doClass = false; // will be removed in future
+            boolean classNameForMissingPropertyPath = true; // !doClass;
+            boolean doProperties = true;
+            boolean doCreateOrNew = !isFirst;
+            String contextmarkup = formatter.format(
+                    cntxt,
+                    new EditorActionContextFormat(doClass, doProperties, classNameForMissingPropertyPath, doCreateOrNew,
+                            EditorActionContextFormat.TargetInfoType.FIELD_CAPTION, (isLast ? "active" : ""))
+                    );
+//            if(!isLast){
+//                contextmarkup += " " + FontAwesome.ANGLE_RIGHT.getHtml() + " ";
+//            }
+            if(isLast){
+                contextmarkup = "<li><span class=\"crumb active\">" + contextmarkup + "</span></li>";
+            } else {
+                contextmarkup = "<li><span class=\"crumb\">" + contextmarkup + "</span></li>";
+            }
+            breadcrumbs += contextmarkup;
+        }
+        contextBreadcrumbsLabel.setValue("<ul class=\"breadcrumbs\">" + breadcrumbs + "</ul>");
+    }
+
     // ------------------------ data binding ------------------------ //
 
     protected void bindDesign(Component component) {
@@ -733,6 +778,7 @@ public abstract class AbstractPopupEditor<DTO extends Object, P extends Abstract
         fieldGroup.setItemDataSource(beanToEdit);
         afterItemDataSourceSet();
         getPresenter().adaptToUserPermission(beanToEdit);
+        updateContextBreadcrumbs();
         isBeanLoaded = true;
     }
 
@@ -817,7 +863,7 @@ public abstract class AbstractPopupEditor<DTO extends Object, P extends Abstract
             if(getBean() == null){
                 throw new RuntimeException("getContext() is only possible after the bean is loaded");
             }
-            context.push(new AbstractEditorAction.EditorActionContext(getBean(), this));
+            context.push(new EditorActionContext(getBean(), this));
             isContextUpdated = true;
         }
         return context;
@@ -828,10 +874,13 @@ public abstract class AbstractPopupEditor<DTO extends Object, P extends Abstract
      *
      * @param context the context to set
      */
-    public void setParentEditorActionContext(Stack<EditorActionContext> context) {
+    public void setParentEditorActionContext(Stack<EditorActionContext> context, Field<?> targetField) {
         if(context != null){
             this.context.addAll(context);
         }
+        if(targetField != null){
+            this.context.get(context.size() - 1).setTargetField(targetField);
+        }
     }
 
     protected AbstractField<String> replaceComponent(String propertyId, AbstractField<String> oldField, AbstractField<String> newField, int column1, int row1, int column2,
diff --git a/src/main/java/eu/etaxonomy/vaadin/ui/navigation/NavigationManagerBean.java b/src/main/java/eu/etaxonomy/vaadin/ui/navigation/NavigationManagerBean.java
index ba1e7295..5a6ff965 100644
--- a/src/main/java/eu/etaxonomy/vaadin/ui/navigation/NavigationManagerBean.java
+++ b/src/main/java/eu/etaxonomy/vaadin/ui/navigation/NavigationManagerBean.java
@@ -23,7 +23,7 @@ import com.vaadin.ui.Field;
 import com.vaadin.ui.UI;
 import com.vaadin.ui.Window;
 
-import eu.etaxonomy.cdm.vaadin.event.AbstractEditorAction.EditorActionContext;
+import eu.etaxonomy.cdm.vaadin.event.EditorActionContext;
 import eu.etaxonomy.vaadin.mvp.AbstractEditorPresenter;
 import eu.etaxonomy.vaadin.mvp.AbstractPopupEditor;
 import eu.etaxonomy.vaadin.mvp.ApplicationView;
@@ -158,7 +158,7 @@ public class NavigationManagerBean extends SpringNavigator implements Navigation
 	        if(parentView instanceof AbstractPopupEditor){
 	            // retain the chain of EditorActionContexts when starting a new pupupEditor
 	            Stack<EditorActionContext> parentEditorActionContext = ((AbstractPopupEditor)parentView).getEditorActionContext();
-	            ((AbstractPopupEditor)popupView).setParentEditorActionContext(parentEditorActionContext);
+	            ((AbstractPopupEditor)popupView).setParentEditorActionContext(parentEditorActionContext, targetField);
 	        }
 	    }
 
diff --git a/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss b/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
index beba6d7a..9ec3a4c9 100644
--- a/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
+++ b/src/main/webapp/VAADIN/themes/edit-valo/edit-valo.scss
@@ -472,6 +472,75 @@ $status-ready-color: adjust-color($plain-red, $hue: 180deg);
         }
     }
     
+    #context-breadcrumbs .breadcrumbs {
+      // for an explanation of how the CSS Triangles to work 
+      // see https://css-tricks.com/triangle-breadcrumbs/
+    
+      $crumb-background-color: $v-app-background-color;
+      $crumb-active-background-color: #3a6972; //TODO calculate using active-color and $v-background-color or $v-app-background-color
+      $crumb-border-color: $v-textfield-background-color--readonly;
+      $crumb-height: 10px; 
+      $triangle-width: 10px; 
+      
+      $crumb-border: valo-border($color: $crumb-border-color);
+      
+      list-style: none; 
+      overflow: hidden;
+      margin: 0; 
+      padding: 0;
+      line-height: $crumb-height;
+      border-radius: $v-border-radius;
+      border: $crumb-border;
+      li {
+          float: left;
+          span.crumb {
+            padding: 10px 10px 10px 20px;
+            background-color: $crumb-background-color;
+            position: relative;
+            display: block;
+            float: left;
+            &::before {
+                  content: " "; 
+                  display: block;
+                  width: 0; 
+                  height: 0;
+                  border-left: $crumb-border;
+                  border-left-width: $triangle-width;
+                  border-top: $crumb-height*2 solid transparent;
+                  border-bottom: $crumb-height*2 solid transparent;
+                  position: absolute;
+                  top: 50%;
+                  margin-top: -$crumb-height*2;
+                  margin-left: 1px;
+                  left: 100%;
+                  z-index: 1; 
+              }
+              &::after {
+                  content: " "; 
+                  display: block;
+                  width: 0; 
+                  height: 0;
+                  border-left: $triangle-width solid $crumb-background-color;
+                  border-top: $crumb-height*2 solid transparent;
+                  border-bottom: $crumb-height*2 solid transparent;
+                  border-right: none;
+                  position: absolute;
+                  top: 50%;
+                  margin-top: -$crumb-height*2;
+                  left: 100%;
+                  z-index: 2; 
+              }
+          }
+          &::first-child span.crumb {
+            padding-left: 10px;
+          }
+          span.active {
+              background-color: $crumb-active-background-color;
+          }
+       }
+       
+    }
+    
     // ---------- ---------- //
 
     .v-slot-message-item {
