comparison flys-client/src/main/java/de/intevation/flys/client/client/ui/CollectionView.java @ 4127:1e9e7b7d9f15

More fixes for #897: missing resource exceptions when handling other exceptions
author Christian Lins <christian.lins@intevation.de>
date Sun, 14 Oct 2012 09:46:58 +0200
parents 6a8f83c538e3
children 4c2005e6ac65
comparison
equal deleted inserted replaced
4126:e0354aed0cd3 4127:1e9e7b7d9f15
1 package de.intevation.flys.client.client.ui; 1 package de.intevation.flys.client.client.ui;
2 2
3 import com.google.gwt.core.client.GWT; 3 import com.google.gwt.core.client.GWT;
4 import com.google.gwt.user.client.rpc.AsyncCallback; 4 import com.google.gwt.user.client.rpc.AsyncCallback;
5
5 import com.smartgwt.client.types.Alignment; 6 import com.smartgwt.client.types.Alignment;
6 import com.smartgwt.client.types.VerticalAlignment; 7 import com.smartgwt.client.types.VerticalAlignment;
7 import com.smartgwt.client.util.SC; 8 import com.smartgwt.client.util.SC;
8 import com.smartgwt.client.widgets.Img; 9 import com.smartgwt.client.widgets.Img;
9 import com.smartgwt.client.widgets.Window; 10 import com.smartgwt.client.widgets.Window;
260 ownerId, 261 ownerId,
261 new AsyncCallback<Collection>() { 262 new AsyncCallback<Collection>() {
262 @Override 263 @Override
263 public void onFailure(Throwable caught) { 264 public void onFailure(Throwable caught) {
264 GWT.log("Could not create the new collection."); 265 GWT.log("Could not create the new collection.");
265 SC.warn(messages.getString(caught.getMessage())); 266 SC.warn(FLYS.getExceptionString(messages, caught));
266 } 267 }
267 268
268 @Override 269 @Override
269 public void onSuccess(Collection collection) { 270 public void onSuccess(Collection collection) {
270 GWT.log("Successfully created a new collection."); 271 GWT.log("Successfully created a new collection.");
439 describeCollectionService.describe(c.identifier(), locale, 440 describeCollectionService.describe(c.identifier(), locale,
440 new AsyncCallback<Collection>() { 441 new AsyncCallback<Collection>() {
441 @Override 442 @Override
442 public void onFailure(Throwable caught) { 443 public void onFailure(Throwable caught) {
443 GWT.log("Could not DESCRIBE collection."); 444 GWT.log("Could not DESCRIBE collection.");
444 SC.warn(messages.getString(caught.getMessage())); 445 SC.warn(FLYS.getExceptionString(messages, caught));
445 } 446 }
446 447
447 448
448 @Override 449 @Override
449 public void onSuccess(Collection newCollection) { 450 public void onSuccess(Collection newCollection) {
662 collection, artifact, locale, 663 collection, artifact, locale,
663 new AsyncCallback<Collection>() { 664 new AsyncCallback<Collection>() {
664 @Override 665 @Override
665 public void onFailure(Throwable caught) { 666 public void onFailure(Throwable caught) {
666 GWT.log("An error occured while adding artifact."); 667 GWT.log("An error occured while adding artifact.");
667 SC.warn(messages.getString(caught.getMessage())); 668 SC.warn(FLYS.getExceptionString(messages, caught));
668 } 669 }
669 670
670 @Override 671 @Override
671 public void onSuccess(Collection newCollection) { 672 public void onSuccess(Collection newCollection) {
672 GWT.log("Successfully added artifacts."); 673 GWT.log("Successfully added artifacts.");
690 public void onFailure(Throwable caught) { 691 public void onFailure(Throwable caught) {
691 newRecommendations.removeAllElements(); 692 newRecommendations.removeAllElements();
692 setCollection(collection); 693 setCollection(collection);
693 694
694 GWT.log("An error occured while saving recommendations."); 695 GWT.log("An error occured while saving recommendations.");
695 // TODO POPUP WARNING 696 SC.warn(FLYS.getExceptionString(messages, caught));
696 } 697 }
697 698
698 @Override 699 @Override
699 public void onSuccess(Collection newCol) { 700 public void onSuccess(Collection newCol) {
700 GWT.log("Successfully saved recommendations."); 701 GWT.log("Successfully saved recommendations.");
740 new AsyncCallback<Artifact[]>() { 741 new AsyncCallback<Artifact[]>() {
741 @Override 742 @Override
742 public void onFailure(Throwable caught) { 743 public void onFailure(Throwable caught) {
743 GWT.log("Error loading recommendations: " + 744 GWT.log("Error loading recommendations: " +
744 caught.getMessage()); 745 caught.getMessage());
746 SC.warn(FLYS.getExceptionString(messages, caught));
745 } 747 }
746 748
747 @Override 749 @Override
748 public void onSuccess(Artifact[] artifacts) { 750 public void onSuccess(Artifact[] artifacts) {
749 GWT.log("Loaded artifacts: " + artifacts.length); 751 GWT.log("Loaded artifacts: " + artifacts.length);

http://dive4elements.wald.intevation.org