Mercurial > dive4elements > river
diff flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java @ 4141:b3bc5e9ba912
Fix for part a) and c) in issue #918
Add a CloseClickHandler if a gauge discharge curve is created.
Also add an entry in the project list in this case.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 15 Oct 2012 16:22:58 +0200 |
parents | 145980c21700 |
children | 03de5c424f95 |
line wrap: on
line diff
--- a/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java Mon Oct 15 16:19:11 2012 +0200 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/FLYS.java Mon Oct 15 16:22:58 2012 +0200 @@ -477,6 +477,7 @@ public void onSuccess(Collection collection) { GWT.log("Successfully created a new collection."); final Collection col = collection; + final ProjectList plist = projectList; artifactService.createGaugeDischargeCurveArtifact( col, locale, riv, ref, new AsyncCallback<Artifact>() { @@ -491,9 +492,13 @@ GWT.log("Successfully created a new artifact."); CollectionView view = new CollectionView(flys, col, artifact); - workspace.addView("new-project", view); + workspace.addView(col.identifier(), view); view.addCollectionChangeHandler(getProjectList()); + view.addCloseClickHandler( + new CloseCollectionViewHandler( + FLYS.this, col.identifier())); + projectList.updateUserCollections(); } }); }