diff flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 1294:94d4f040da3a

Bugfix: #326 Made the process of opening existing project more robust if the collection has no artifact set. flys-client/trunk@2909 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 10 Oct 2011 06:38:35 +0000
parents ea9a73782de4
children bc06a671ef60
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Fri Oct 07 13:39:35 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java	Mon Oct 10 06:38:35 2011 +0000
@@ -156,11 +156,19 @@
         this.handlers      = new ArrayList<CollectionChangeHandler>();
         this.outHandlers   = new ArrayList<OutputModesChangeHandler>();
         this.layout        = new VLayout();
-        this.parameterList = new ParameterList(
-            flys,
-            this,
-            messages.getString(artifact.getName()),
-            artifact);
+
+        if (artifact != null) {
+            this.parameterList = new ParameterList(
+                flys,
+                this,
+                messages.getString(artifact.getName()),
+                artifact);
+        }
+        else {
+            this.parameterList = new ParameterList(
+                flys, this, messages.new_project());
+        }
+
         this.artifactsQueue     = 0;
         this.newRecommendations = new Stack<Recommendation>();
 
@@ -176,7 +184,10 @@
         init();
 
         setCollection(collection);
-        setArtifact(artifact);
+
+        if (artifact != null) {
+            setArtifact(artifact);
+        }
     }
 
 

http://dive4elements.wald.intevation.org