commit 5eece89fab1dd0edeff767b96755c6094bd1e7cb
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Mon Oct 17 12:47:33 2016 +0200

    ref #5458 Split settings window into two
    
     - one for distribution/taxonomy settings and one for other setting

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/component/HorizontalToolbar.java b/src/main/java/eu/etaxonomy/cdm/vaadin/component/HorizontalToolbar.java
index e39d2568..aa3e5863 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/component/HorizontalToolbar.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/component/HorizontalToolbar.java
@@ -36,6 +36,8 @@ public class HorizontalToolbar extends HorizontalLayout implements Serializable{
 
 	private final Button detailButton = new Button("Detail");
 
+	private final Button distributionSettingsButton =  new Button("Distribution Settings");
+
 	private final Button settingsButton =  new Button("Settings");
 
 	private final Button logoutButton= new Button("Logout");
@@ -70,6 +72,7 @@ public class HorizontalToolbar extends HorizontalLayout implements Serializable{
 			editButton.setIcon(new ThemeResource("icons/32/document-edit.png"));
 			detailButton.setIcon(new ThemeResource("icons/32/document-txt.png"));
 			settingsButton.setIcon(new ThemeResource("icons/32/settings_1.png"));
+			distributionSettingsButton.setIcon(new ThemeResource("icons/32/settings_1.png"));
 			logoutButton.setIcon(new ThemeResource("icons/32/cancel.png"));
 
 			//		SecurityContext context = (SecurityContext)VaadinService.getCurrentRequest().getWrappedSession().getAttribute("context");
@@ -80,6 +83,7 @@ public class HorizontalToolbar extends HorizontalLayout implements Serializable{
 			HorizontalLayout rightLayout = new HorizontalLayout();
 			Image image = new Image(null, new ThemeResource("icons/32/vseparator1.png"));
 			rightLayout.addComponent(settingsButton);
+			rightLayout.addComponent(distributionSettingsButton);
 			rightLayout.addComponent(logoutButton);
 			rightLayout.addComponent(image);
 			rightLayout.addComponent(loginName);
@@ -109,6 +113,10 @@ public class HorizontalToolbar extends HorizontalLayout implements Serializable{
     public Button getSettingsButton(){
         return settingsButton;
     }
+    
+    public Button getDistributionSettingsButton() {
+		return distributionSettingsButton;
+	}
 
 	public Button getEditButton() {
 		return editButton;
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSettingsConfigWindow.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSettingsConfigWindow.java
new file mode 100644
index 00000000..074eb07c
--- /dev/null
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionSettingsConfigWindow.java
@@ -0,0 +1,239 @@
+// $Id$
+/**
+* Copyright (C) 2015 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.view.dbstatus;
+
+import java.util.Set;
+
+import com.vaadin.data.Container;
+import com.vaadin.data.Property;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.server.VaadinSession;
+import com.vaadin.ui.AbstractLayout;
+import com.vaadin.ui.Alignment;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.CustomComponent;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.ListSelect;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.Tree;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Window;
+
+import eu.etaxonomy.cdm.model.common.TermVocabulary;
+import eu.etaxonomy.cdm.model.location.NamedArea;
+import eu.etaxonomy.cdm.model.taxon.TaxonNode;
+import eu.etaxonomy.cdm.vaadin.container.NamedAreaContainer;
+import eu.etaxonomy.cdm.vaadin.container.TaxonNodeContainer;
+import eu.etaxonomy.cdm.vaadin.presenter.dbstatus.settings.SettingsPresenter;
+import eu.etaxonomy.cdm.vaadin.util.DistributionEditorUtil;
+
+/**
+ * 
+ * @author pplitzner
+ *
+ */
+public class DistributionSettingsConfigWindow extends CustomComponent implements ValueChangeListener, ClickListener{
+
+	private static final long serialVersionUID = 1439411115014088780L;
+	private ComboBox classificationBox;
+    private ComboBox distAreaBox;
+    private ListSelect namedAreaList;
+    private Tree taxonTree;
+    private Label labelNoClassification;
+    private Button okButton;
+    private Button cancelButton;
+    private final SettingsPresenter presenter;
+	private Window window;
+	private HorizontalLayout mainLayout;
+
+    /**
+     * The constructor should first build the main layout, set the
+     * composition root and then do any custom initialization.
+     *
+     * The constructor will not be automatically regenerated by the
+     * visual editor.
+     * @param distributionTableView 
+     */
+    public DistributionSettingsConfigWindow(DistributionTableView distributionTableView) {
+        buildMainLayout();
+        presenter = new SettingsPresenter();
+        init();
+    }
+
+    private void init() {
+        Container distributionContainer = presenter.getDistributionContainer();
+        TermVocabulary<NamedArea> chosenArea = presenter.getChosenArea();
+        
+        classificationBox.setItemCaptionPropertyId(TaxonNodeContainer.LABEL);
+        classificationBox.setContainerDataSource(new TaxonNodeContainer(null));
+		classificationBox.setImmediate(true);
+        TaxonNode chosenTaxonNode = presenter.getChosenTaxonNode();
+		classificationBox.addValueChangeListener(this);
+        if(chosenTaxonNode!=null){
+        	classificationBox.setValue(chosenTaxonNode.getClassification().getRootNode());
+        	taxonTree.setContainerDataSource(new TaxonNodeContainer((TaxonNode) classificationBox.getValue()));
+        	taxonTree.setValue(chosenTaxonNode);
+        }
+        taxonTree.setItemCaptionPropertyId(TaxonNodeContainer.LABEL);
+        distAreaBox.setContainerDataSource(distributionContainer);
+        distAreaBox.setValue(chosenArea);
+        distAreaBox.addValueChangeListener(this);
+        
+        if(chosenArea!=null){
+        	NamedAreaContainer container = new NamedAreaContainer(chosenArea);
+        	namedAreaList.setContainerDataSource(container);
+        }
+        Object selectedAreas = VaadinSession.getCurrent().getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREAS);
+        namedAreaList.setValue(selectedAreas);
+        
+        okButton.addClickListener(this);
+        cancelButton.addClickListener(this);
+    }
+
+    public Window createWindow(){
+        window = new Window();
+        window.setModal(true);
+        window.setWidth("60%");
+        window.setHeight("80%");
+        window.setCaption("Settings");
+        window.setContent(mainLayout);
+        return window;
+    }
+
+    private AbstractLayout buildMainLayout() {
+
+    	mainLayout = new HorizontalLayout();
+        mainLayout.setImmediate(false);
+        mainLayout.setSizeFull();
+        mainLayout.setMargin(true);
+        mainLayout.setSpacing(true);
+
+        VerticalLayout leftContainer = new VerticalLayout();
+        leftContainer.setImmediate(false);
+        leftContainer.setSizeFull();
+        leftContainer.setSpacing(true);
+
+        VerticalLayout rightContainer = new VerticalLayout();
+        rightContainer.setImmediate(false);
+        rightContainer.setSizeFull();
+        rightContainer.setSpacing(true);
+
+        //classification and term
+        classificationBox = new ComboBox("Classification");
+        classificationBox.setImmediate(true);
+        classificationBox.setWidth("100%");
+
+        //distribution area box
+        distAreaBox = new ComboBox("Distribution Area:");
+        distAreaBox.setImmediate(true);
+        distAreaBox.setWidth("100%");
+
+        // named areas
+        namedAreaList = new ListSelect();
+        namedAreaList.setCaption("Areas");
+        namedAreaList.setWidth("100%");
+        namedAreaList.setMultiSelect(true);
+
+        //taxonomy
+        taxonTree = new Tree("Taxonomy");
+        taxonTree.setImmediate(false);
+        
+        //no classification selected label
+        labelNoClassification = new Label(" - Please select a classification - ");
+
+        leftContainer.addComponent(classificationBox);
+        leftContainer.addComponent(distAreaBox);
+        leftContainer.addComponent(namedAreaList);
+        leftContainer.setSizeFull();
+        
+        rightContainer.addComponent(taxonTree);
+        rightContainer.setExpandRatio(taxonTree, 1);
+        rightContainer.addComponent(labelNoClassification);
+        rightContainer.setComponentAlignment(labelNoClassification, Alignment.BOTTOM_RIGHT);
+
+        mainLayout.addComponent(leftContainer);
+        mainLayout.addComponent(rightContainer);
+
+        //button toolbar
+        HorizontalLayout buttonToolBar = new HorizontalLayout();
+        // cancelButton
+        cancelButton = new Button();
+        cancelButton.setCaption("Cancel");
+        cancelButton.setImmediate(true);
+        buttonToolBar.addComponent(cancelButton);
+
+        // okButton
+        okButton = new Button();
+        okButton.setCaption("OK");
+        okButton.setImmediate(true);
+        buttonToolBar.addComponent(okButton);
+
+        mainLayout.addComponent(rightContainer);
+        mainLayout.addComponent(buttonToolBar);
+        mainLayout.setComponentAlignment(buttonToolBar, Alignment.BOTTOM_RIGHT);
+
+        return mainLayout;
+    }
+
+	@Override
+	public void valueChange(ValueChangeEvent event) {
+		Property property = event.getProperty();
+		if(property==classificationBox){
+			TaxonNode parentNode = (TaxonNode) event.getProperty().getValue();
+			if(parentNode!=null){
+				taxonTree.setContainerDataSource(new TaxonNodeContainer(parentNode));
+			}
+			else{
+				taxonTree.setContainerDataSource(null);
+			}
+			labelNoClassification.setVisible(parentNode==null);
+		}
+
+		else if(property==distAreaBox){
+			TermVocabulary<NamedArea> vocabulary = (TermVocabulary<NamedArea>) event.getProperty().getValue();
+			NamedAreaContainer container = new NamedAreaContainer(vocabulary);
+			namedAreaList.setContainerDataSource(container);
+		}
+	}
+
+	@Override
+	public void buttonClick(ClickEvent event) {
+		Object source = event.getSource();
+		if(source==okButton){
+			TaxonNode taxonNode;
+			TermVocabulary<NamedArea> term = null;
+			taxonNode = (TaxonNode) taxonTree.getValue();
+			if(taxonNode==null){
+				taxonNode = (TaxonNode) classificationBox.getValue();
+			}
+			term = (TermVocabulary<NamedArea>) distAreaBox.getValue();
+			Set<NamedArea> selectedAreas = (Set<NamedArea>) namedAreaList.getValue();
+			if(taxonNode==null){
+				Notification.show("Please choose a classification and/or taxon", Notification.Type.HUMANIZED_MESSAGE);
+				return;
+			}
+			if(term==null){
+				Notification.show("Please choose a distribution area", Notification.Type.HUMANIZED_MESSAGE);
+				return;
+			}
+			DistributionEditorUtil.openDistributionView(taxonNode, term, selectedAreas);
+			window.close();
+		}
+		else if(source==cancelButton){
+			window.close();
+		}
+	}
+
+}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionTableView.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionTableView.java
index 96805715..a0d3ec55 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionTableView.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/DistributionTableView.java
@@ -189,17 +189,28 @@ public class DistributionTableView extends CustomComponent implements View{
 			}
 		});
 
-		Button settingsButton = toolbar.getSettingsButton();
-		settingsButton.addClickListener(new ClickListener() {
+		Button distributionSettingsButton = toolbar.getDistributionSettingsButton();
+		distributionSettingsButton.addClickListener(new ClickListener() {
 
-			private static final long serialVersionUID = 3834048719431837966L;
+			private static final long serialVersionUID = -8695281619014251132L;
 
 			@Override
             public void buttonClick(ClickEvent event) {
-                openSettings();
+                openDistributionSettings();
             }
         });
 
+		Button settingsButton = toolbar.getSettingsButton();
+		settingsButton.addClickListener(new ClickListener() {
+			
+			private static final long serialVersionUID = -147703680580181544L;
+
+			@Override
+			public void buttonClick(ClickEvent event) {
+				openSettings();
+			}
+		});
+
 		Button saveButton = toolbar.getSaveButton();
 		saveButton.setClickShortcut(KeyCode.S, ModifierKey.CTRL);
 		saveButton.setDescription("Shortcut: CTRL+S");
@@ -221,7 +232,13 @@ public class DistributionTableView extends CustomComponent implements View{
 	}
 	
 	public void openSettings() {
-		SettingsConfigWindow cw = new SettingsConfigWindow();
+		SettingsConfigWindow cw = new SettingsConfigWindow(this);
+		Window window  = cw.createWindow();
+		getUI().addWindow(window);
+	}
+
+	public void openDistributionSettings() {
+		DistributionSettingsConfigWindow cw = new DistributionSettingsConfigWindow(this);
         Window window  = cw.createWindow();
         getUI().addWindow(window);
 	}
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/SettingsConfigWindow.java b/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/SettingsConfigWindow.java
index 2a4e87eb..b56c412c 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/SettingsConfigWindow.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/SettingsConfigWindow.java
@@ -9,9 +9,6 @@
 */
 package eu.etaxonomy.cdm.vaadin.view.dbstatus;
 
-import java.util.Set;
-
-import com.vaadin.data.Container;
 import com.vaadin.data.Property;
 import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.data.Property.ValueChangeListener;
@@ -22,22 +19,12 @@ import com.vaadin.ui.Button;
 import com.vaadin.ui.Button.ClickEvent;
 import com.vaadin.ui.Button.ClickListener;
 import com.vaadin.ui.CheckBox;
-import com.vaadin.ui.ComboBox;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.Label;
-import com.vaadin.ui.ListSelect;
-import com.vaadin.ui.Notification;
-import com.vaadin.ui.Tree;
 import com.vaadin.ui.TwinColSelect;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
 
-import eu.etaxonomy.cdm.model.common.TermVocabulary;
-import eu.etaxonomy.cdm.model.location.NamedArea;
-import eu.etaxonomy.cdm.model.taxon.TaxonNode;
-import eu.etaxonomy.cdm.vaadin.container.NamedAreaContainer;
-import eu.etaxonomy.cdm.vaadin.container.TaxonNodeContainer;
 import eu.etaxonomy.cdm.vaadin.presenter.dbstatus.settings.SettingsPresenter;
 import eu.etaxonomy.cdm.vaadin.util.DistributionEditorUtil;
 
@@ -51,16 +38,12 @@ public class SettingsConfigWindow extends CustomComponent implements ValueChange
 	private static final long serialVersionUID = -8220442386869594032L;
     private VerticalLayout mainLayout;
     private TwinColSelect distStatusSelect;
-    private ComboBox classificationBox;
-    private ComboBox distAreaBox;
-    private ListSelect namedAreaList;
-    private Tree taxonTree;
-    private Label labelNoClassification;
     private CheckBox boxToggleAbbreviatedLabels;
     private Button okButton;
     private Button cancelButton;
     private final SettingsPresenter presenter;
 	private Window window;
+	private DistributionTableView distributionTableView;
 
     /**
      * The constructor should first build the main layout, set the
@@ -68,39 +51,16 @@ public class SettingsConfigWindow extends CustomComponent implements ValueChange
      *
      * The constructor will not be automatically regenerated by the
      * visual editor.
+     * @param distributionTableView 
      */
-    public SettingsConfigWindow() {
+    public SettingsConfigWindow(DistributionTableView distributionTableView) {
+    	this.distributionTableView = distributionTableView;
         buildMainLayout();
         presenter = new SettingsPresenter();
         init();
     }
 
     private void init() {
-        Container distributionContainer = presenter.getDistributionContainer();
-        TermVocabulary<NamedArea> chosenArea = presenter.getChosenArea();
-        
-        classificationBox.setItemCaptionPropertyId(TaxonNodeContainer.LABEL);
-        classificationBox.setContainerDataSource(new TaxonNodeContainer(null));
-		classificationBox.setImmediate(true);
-        TaxonNode chosenTaxonNode = presenter.getChosenTaxonNode();
-		classificationBox.addValueChangeListener(this);
-        if(chosenTaxonNode!=null){
-        	classificationBox.setValue(chosenTaxonNode.getClassification().getRootNode());
-        	taxonTree.setContainerDataSource(new TaxonNodeContainer((TaxonNode) classificationBox.getValue()));
-        	taxonTree.setValue(chosenTaxonNode);
-        }
-        taxonTree.setItemCaptionPropertyId(TaxonNodeContainer.LABEL);
-        distAreaBox.setContainerDataSource(distributionContainer);
-        distAreaBox.setValue(chosenArea);
-        distAreaBox.addValueChangeListener(this);
-        
-        if(chosenArea!=null){
-        	NamedAreaContainer container = new NamedAreaContainer(chosenArea);
-        	namedAreaList.setContainerDataSource(container);
-        }
-        Object selectedAreas = VaadinSession.getCurrent().getAttribute(DistributionEditorUtil.SATTR_SELECTED_AREAS);
-        namedAreaList.setValue(selectedAreas);
-        
         boxToggleAbbreviatedLabels.addValueChangeListener(this);
         distStatusSelect.setContainerDataSource(presenter.getDistributionStatusContainer());
 
@@ -126,30 +86,6 @@ public class SettingsConfigWindow extends CustomComponent implements ValueChange
         mainLayout.setMargin(true);
         mainLayout.setSpacing(true);
 
-        HorizontalLayout topContainer = new HorizontalLayout();
-        topContainer.setImmediate(false);
-        topContainer.setSizeFull();
-        topContainer.setSpacing(true);
-
-        VerticalLayout verticalLayout = new VerticalLayout();
-        verticalLayout.setImmediate(false);
-
-        //classification and term
-        classificationBox = new ComboBox("Classification");
-        classificationBox.setImmediate(true);
-        classificationBox.setWidth("100%");
-
-        //distribution area box
-        distAreaBox = new ComboBox("Distribution Area:");
-        distAreaBox.setImmediate(true);
-        distAreaBox.setWidth("100%");
-
-        // named areas
-        namedAreaList = new ListSelect();
-        namedAreaList.setCaption("Areas");
-        namedAreaList.setWidth("100%");
-        namedAreaList.setMultiSelect(true);
-
         //distribution status
         distStatusSelect = new TwinColSelect("Distribution Status:");
         distStatusSelect.setImmediate(false);
@@ -159,45 +95,27 @@ public class SettingsConfigWindow extends CustomComponent implements ValueChange
         boxToggleAbbreviatedLabels = new CheckBox("Show abbreviated labels", DistributionEditorUtil.isAbbreviatedLabels());
         boxToggleAbbreviatedLabels.setImmediate(true);
 
-        //taxonomy
-        taxonTree = new Tree("Taxonomy");
-        taxonTree.setImmediate(false);
-        
-        //no classification selected label
-        labelNoClassification = new Label(" - Please select a classification - ");
-
-        verticalLayout.addComponent(classificationBox);
-        verticalLayout.addComponent(distAreaBox);
-        verticalLayout.addComponent(namedAreaList);
-        verticalLayout.addComponent(boxToggleAbbreviatedLabels);
-        verticalLayout.addComponent(distStatusSelect);
-        verticalLayout.setExpandRatio(distStatusSelect, 1);
-        verticalLayout.setSizeFull();
-
-        topContainer.addComponent(verticalLayout);
-        topContainer.addComponent(taxonTree);
-        topContainer.setExpandRatio(taxonTree, 1);
-        topContainer.addComponent(labelNoClassification);
-        topContainer.setComponentAlignment(labelNoClassification, Alignment.BOTTOM_RIGHT);
-        topContainer.setExpandRatio(verticalLayout, 1);
+        mainLayout.addComponent(boxToggleAbbreviatedLabels);
+        mainLayout.addComponent(distStatusSelect);
+        mainLayout.setExpandRatio(distStatusSelect, 1);
+        mainLayout.setSizeFull();
 
         //button toolbar
-        HorizontalLayout buttonToolBar = new HorizontalLayout();
+        HorizontalLayout buttonContainer = new HorizontalLayout();
         // cancelButton
         cancelButton = new Button();
         cancelButton.setCaption("Cancel");
         cancelButton.setImmediate(true);
-        buttonToolBar.addComponent(cancelButton);
+        buttonContainer.addComponent(cancelButton);
 
         // okButton
         okButton = new Button();
         okButton.setCaption("OK");
         okButton.setImmediate(true);
-        buttonToolBar.addComponent(okButton);
+        buttonContainer.addComponent(okButton);
 
-        mainLayout.addComponent(topContainer);
-        mainLayout.addComponent(buttonToolBar);
-        mainLayout.setComponentAlignment(buttonToolBar, Alignment.BOTTOM_RIGHT);
+        mainLayout.addComponent(buttonContainer);
+        mainLayout.setComponentAlignment(buttonContainer, Alignment.BOTTOM_RIGHT);
 
         return mainLayout;
     }
@@ -205,23 +123,7 @@ public class SettingsConfigWindow extends CustomComponent implements ValueChange
 	@Override
 	public void valueChange(ValueChangeEvent event) {
 		Property property = event.getProperty();
-		if(property==classificationBox){
-			TaxonNode parentNode = (TaxonNode) event.getProperty().getValue();
-			if(parentNode!=null){
-				taxonTree.setContainerDataSource(new TaxonNodeContainer(parentNode));
-			}
-			else{
-				taxonTree.setContainerDataSource(null);
-			}
-			labelNoClassification.setVisible(parentNode==null);
-		}
-
-		else if(property==distAreaBox){
-			TermVocabulary<NamedArea> vocabulary = (TermVocabulary<NamedArea>) event.getProperty().getValue();
-			NamedAreaContainer container = new NamedAreaContainer(vocabulary);
-			namedAreaList.setContainerDataSource(container);
-		}
-		else if(property==boxToggleAbbreviatedLabels){
+		if(property==boxToggleAbbreviatedLabels){
 			VaadinSession.getCurrent().setAttribute(DistributionEditorUtil.SATTR_ABBREVIATED_LABELS, event.getProperty().getValue());
 		}
 	}
@@ -230,23 +132,7 @@ public class SettingsConfigWindow extends CustomComponent implements ValueChange
 	public void buttonClick(ClickEvent event) {
 		Object source = event.getSource();
 		if(source==okButton){
-			TaxonNode taxonNode;
-			TermVocabulary<NamedArea> term = null;
-			taxonNode = (TaxonNode) taxonTree.getValue();
-			if(taxonNode==null){
-				taxonNode = (TaxonNode) classificationBox.getValue();
-			}
-			term = (TermVocabulary<NamedArea>) distAreaBox.getValue();
-			Set<NamedArea> selectedAreas = (Set<NamedArea>) namedAreaList.getValue();
-			if(taxonNode==null){
-				Notification.show("Please choose a classification and/or taxon", Notification.Type.HUMANIZED_MESSAGE);
-				return;
-			}
-			if(term==null){
-				Notification.show("Please choose a distribution area", Notification.Type.HUMANIZED_MESSAGE);
-				return;
-			}
-			DistributionEditorUtil.openDistributionView(taxonNode, term, selectedAreas);
+			distributionTableView.enter(null);
 			window.close();
 		}
 		else if(source==cancelButton){
