commit 6f0224b6cade7ea34ff32f25637cfe009fcb72a1
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Thu Sep 22 11:31:55 2016 +0200

    ref #5458 Do view data binding in enter() method of table view

diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/DistributionTablePresenter.java b/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/DistributionTablePresenter.java
index 16ac92d9..ffd5cc6d 100644
--- a/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/DistributionTablePresenter.java
+++ b/src/main/java/eu/etaxonomy/cdm/vaadin/presenter/dbstatus/DistributionTablePresenter.java
@@ -61,7 +61,6 @@ public class DistributionTablePresenter implements IDistributionTableComponent.D
 		vocabularyService = CdmSpringContextHelper.getVocabularyService();
 		descriptionService = CdmSpringContextHelper.getDescriptionService();
 		termService = CdmSpringContextHelper.getTermService();
-		view.dataBinding();
 	}
 
 
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 a72bdb5e..c5ea2136 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
@@ -22,6 +22,7 @@ import com.vaadin.ui.Button.ClickListener;
 import com.vaadin.ui.ComboBox;
 import com.vaadin.ui.CustomComponent;
 import com.vaadin.ui.Notification;
+import com.vaadin.ui.Notification.Type;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Table.ColumnGenerator;
 import com.vaadin.ui.Window;
@@ -117,12 +118,16 @@ public class DistributionTableView extends CustomComponent implements IDistribut
 	   this.listener = listener;
 	}
 
-    @Override
-    public void enter(ViewChangeEvent event) {
-    }
-
-	public void dataBinding() throws SQLException{
-		CdmSQLContainer container = listener.getSQLContainer();
+	@Override
+	public void enter(ViewChangeEvent event) {
+		CdmSQLContainer container = null;
+		try {
+			container = listener.getSQLContainer();
+		} catch (SQLException e) {
+			Notification.show("Could not acces data base", Type.ERROR_MESSAGE);
+			e.printStackTrace();
+			return;
+		}
 
 		table.setContainerDataSource(container);
 		table.setColumnReorderingAllowed(true);
@@ -144,17 +149,16 @@ public class DistributionTableView extends CustomComponent implements IDistribut
 		table.setColumnFooter(CdmQueryFactory.TAXON_COLUMN, "Total amount of Taxa displayed: " + container.size());
 
 		table.setCacheRate(20);
-		
+
 		//add generated columns for NamedAreas
 		Collection<?> containerPropertyIds = table.getContainerPropertyIds();
 		for (Object object : containerPropertyIds) {
 			if(termList.contains(object)){
-				  table.addGeneratedColumn(object, new AreaColumnGenerator());
+				table.addGeneratedColumn(object, new AreaColumnGenerator());
 			}
 		}
 	}
 
-
 	private void createEditClickListener(){
 		Button detailButton = toolbar.getDetailButton();
 		detailButton.setCaption("Detail View");
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 17e5cced..e90cd89b 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,8 +9,6 @@
 */
 package eu.etaxonomy.cdm.vaadin.view.dbstatus;
 
-import java.sql.SQLException;
-
 import com.vaadin.data.Container;
 import com.vaadin.data.Property.ValueChangeEvent;
 import com.vaadin.data.Property.ValueChangeListener;
@@ -34,7 +32,6 @@ import eu.etaxonomy.cdm.model.common.DefinedTermBase;
 import eu.etaxonomy.cdm.model.common.TermVocabulary;
 import eu.etaxonomy.cdm.model.taxon.TaxonNode;
 import eu.etaxonomy.cdm.vaadin.container.TaxonNodeContainer;
-import eu.etaxonomy.cdm.vaadin.presenter.dbstatus.DistributionTablePresenter;
 import eu.etaxonomy.cdm.vaadin.presenter.dbstatus.settings.SettingsPresenter;
 
 /**
@@ -112,14 +109,6 @@ public class SettingsConfigWindow extends CustomComponent {
 			    VaadinSession.getCurrent().setAttribute("taxonNodeUUID", taxonNode.getUuid());
 			    VaadinSession.getCurrent().setAttribute("selectedTerm", term.getUuid());
 
-			    DistributionTableView dtv = new DistributionTableView();
-			    try {
-					new DistributionTablePresenter(dtv);
-				} catch (SQLException e) {
-					e.printStackTrace();
-				}
-			    UI.getCurrent().getNavigator().addView("table", dtv);
-			    //navigate to table view
 			    window.close();
 		        UI.getCurrent().getNavigator().navigateTo("table");				
 			}
