From d0bbbe4c657e1870fd15e770edfc731605f386a1 Mon Sep 17 00:00:00 2001
From: Nils Christian Ehmke <nie@informatik.uni-kiel.de>
Date: Wed, 10 Oct 2012 22:35:24 +0200
Subject: [PATCH] Minor bugfixing.

---
 .../main/java/kieker/webgui/common/util/FSManager.java | 10 ++++------
 .../src/main/resources/lang/Common_de.properties       |  2 ++
 .../src/main/resources/lang/Common_en.properties       |  2 ++
 .../src/main/webapp/ProjectOverviewPage.xhtml          |  2 +-
 4 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/Kieker.WebGUI/src/main/java/kieker/webgui/common/util/FSManager.java b/Kieker.WebGUI/src/main/java/kieker/webgui/common/util/FSManager.java
index 706b173a..9471f215 100644
--- a/Kieker.WebGUI/src/main/java/kieker/webgui/common/util/FSManager.java
+++ b/Kieker.WebGUI/src/main/java/kieker/webgui/common/util/FSManager.java
@@ -34,8 +34,6 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 
-import javax.annotation.PostConstruct;
-
 import kieker.analysis.AnalysisController;
 import kieker.analysis.model.analysisMetaModel.MIAnalysisMetaModelFactory;
 import kieker.analysis.model.analysisMetaModel.MIDependency;
@@ -101,14 +99,14 @@ public final class FSManager {
 	 * Creates a new instance of this class.
 	 */
 	private FSManager() {
-		// No code necessary
+		this.initialize();
 	}
 
 	/**
-	 * This method initializes the class. <b>Do not call this method. The method is managed by the class loader.</b>
+	 * This method initializes the class. Normally this method should be called via the @PostConstruction annotation, but for unknown reason it does only work for
+	 * beans.
 	 */
-	@PostConstruct
-	protected void initialize() {
+	private void initialize() {
 		// Check for our root-directory and create it if necessary
 		final File rootDir = new File(FSManager.ROOT_DIRECTORY);
 		if (!rootDir.exists()) {
diff --git a/Kieker.WebGUI/src/main/resources/lang/Common_de.properties b/Kieker.WebGUI/src/main/resources/lang/Common_de.properties
index 5c3f7d72..d44232df 100644
--- a/Kieker.WebGUI/src/main/resources/lang/Common_de.properties
+++ b/Kieker.WebGUI/src/main/resources/lang/Common_de.properties
@@ -29,6 +29,8 @@ saveProjectAs = Projekt Speichern Unter
 reloadProject = Projekt Neu Laden
 closeProject = Projekt schlie\u00dfen
 
+noRecordsFound = Keine Einträge vorhanden.
+
 #------------------------------------------------------------------------------
 #
 # These are the messages for the settings dialog.
diff --git a/Kieker.WebGUI/src/main/resources/lang/Common_en.properties b/Kieker.WebGUI/src/main/resources/lang/Common_en.properties
index 611958bc..c6c2733f 100644
--- a/Kieker.WebGUI/src/main/resources/lang/Common_en.properties
+++ b/Kieker.WebGUI/src/main/resources/lang/Common_en.properties
@@ -29,6 +29,8 @@ saveProjectAs = Save Project As
 reloadProject = Reload Project
 closeProject = Close Project	
 
+noRecordsFound = No records found.
+
 #------------------------------------------------------------------------------
 #
 # These are the messages for the settings dialog.
diff --git a/Kieker.WebGUI/src/main/webapp/ProjectOverviewPage.xhtml b/Kieker.WebGUI/src/main/webapp/ProjectOverviewPage.xhtml
index d92e1bfa..e7a2d9cb 100644
--- a/Kieker.WebGUI/src/main/webapp/ProjectOverviewPage.xhtml
+++ b/Kieker.WebGUI/src/main/webapp/ProjectOverviewPage.xhtml
@@ -65,7 +65,7 @@
             <!-- Abstand zu Icons -->
             <p:layoutUnit position="center">
                 <h:form id="projectsListForm"> 
-                    <p:dataTable rows="15" paginator="true" paginatorPosition="both" var="project" rowsPerPageTemplate="5,10,15,25,50" value="#{currentProjectOverviewBean.projects}" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" selection="#{currentProjectOverviewBean.projectName}" rowKey="#{project}" selectionMode="single">  
+                    <p:dataTable emptyMessage="#{localizedMessages.noRecordsFound}" rows="15" paginator="true" paginatorPosition="both" var="project" rowsPerPageTemplate="5,10,15,25,50" value="#{currentProjectOverviewBean.projects}" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" selection="#{currentProjectOverviewBean.projectName}" rowKey="#{project}" selectionMode="single">  
                         <!-- Makes sure that rows are selected instantaneously. -->
                         <p:ajax event="rowSelect" listener="#{currentProjectOverviewBean.onRowSelect}" update=":menuForm" />
 
-- 
GitLab