comparison 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
comparison
equal deleted inserted replaced
4140:a9bafa5445f9 4141:b3bc5e9ba912
475 475
476 @Override 476 @Override
477 public void onSuccess(Collection collection) { 477 public void onSuccess(Collection collection) {
478 GWT.log("Successfully created a new collection."); 478 GWT.log("Successfully created a new collection.");
479 final Collection col = collection; 479 final Collection col = collection;
480 final ProjectList plist = projectList;
480 artifactService.createGaugeDischargeCurveArtifact( 481 artifactService.createGaugeDischargeCurveArtifact(
481 col, locale, riv, ref, 482 col, locale, riv, ref,
482 new AsyncCallback<Artifact>() { 483 new AsyncCallback<Artifact>() {
483 @Override 484 @Override
484 public void onFailure(Throwable caught) { 485 public void onFailure(Throwable caught) {
489 @Override 490 @Override
490 public void onSuccess(Artifact artifact) { 491 public void onSuccess(Artifact artifact) {
491 GWT.log("Successfully created a new artifact."); 492 GWT.log("Successfully created a new artifact.");
492 CollectionView view = new CollectionView(flys, 493 CollectionView view = new CollectionView(flys,
493 col, artifact); 494 col, artifact);
494 workspace.addView("new-project", view); 495 workspace.addView(col.identifier(), view);
495 496
496 view.addCollectionChangeHandler(getProjectList()); 497 view.addCollectionChangeHandler(getProjectList());
498 view.addCloseClickHandler(
499 new CloseCollectionViewHandler(
500 FLYS.this, col.identifier()));
501 projectList.updateUserCollections();
497 } 502 }
498 }); 503 });
499 } 504 }
500 }); 505 });
501 } 506 }

http://dive4elements.wald.intevation.org