# HG changeset patch # User Raimund Renkert # Date 1326359989 0 # Node ID 685bce693617b1d5d1bff579cb3d901cb5621076 # Parent 9119bf1f9e5e77bcebe9371f96c1b37a41bed974 Issue451. Avoid loading more than one map output tab. flys-client/trunk@3657 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 9119bf1f9e5e -r 685bce693617 flys-client/ChangeLog --- a/flys-client/ChangeLog Wed Jan 11 14:31:21 2012 +0000 +++ b/flys-client/ChangeLog Thu Jan 12 09:19:49 2012 +0000 @@ -1,3 +1,11 @@ +2012-01-12 Raimund Renkert + + Issue451. + + * src/main/java/de/intevation/flys/client/client/ui/CollectionView.java: + Added recommendations queue. The queue avoids loading more than one + map output tab. + 2012-01-11 Felix Wolfsteller Partial flys/issue439 (Streckenfavoriten lassen sich nicht über den diff -r 9119bf1f9e5e -r 685bce693617 flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java Wed Jan 11 14:31:21 2012 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java Thu Jan 12 09:19:49 2012 +0000 @@ -109,6 +109,7 @@ protected Layout layout; protected int artifactsQueue; + protected int recommendationQueue; protected Stack newRecommendations; @@ -132,6 +133,7 @@ this.parameterList = new ParameterList( flys, this, messages.new_project()); this.artifactsQueue = 0; + this.recommendationQueue = 0; this.newRecommendations = new Stack(); addCollectionChangeHandler(this); @@ -381,7 +383,14 @@ public void onSuccess(Collection newCollection) { GWT.log("Successfully DESCRIBED collection."); - setCollection(newCollection); + boolean loaded = false; + List r = newCollection.getRecommendations(); + for (Recommendation rec: r) { + loaded = newCollection.loadedRecommendation(rec); + } + if (loaded) { + setCollection(newCollection); + } } } ); @@ -588,6 +597,7 @@ artifactsQueue--; addRecommendationsToCollection(); + recommendationQueue++; } } ); @@ -614,7 +624,10 @@ public void onSuccess(Collection newCol) { GWT.log("Successfully saved recommendations."); newRecommendations.removeAllElements(); - setCollection(newCol); + recommendationQueue--; + if(recommendationQueue == 0) { + setCollection(newCol); + } } } );