ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1308951 - /ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
Date Tue, 03 Apr 2012 14:39:22 GMT
Author: jawi
Date: Tue Apr  3 14:39:22 2012
New Revision: 1308951

URL: http://svn.apache.org/viewvc?rev=1308951&view=rev
Log:
ACE-246: at least give a proper notification if the removal fails.

Modified:
    ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java

Modified: ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
URL: http://svn.apache.org/viewvc/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java?rev=1308951&r1=1308950&r2=1308951&view=diff
==============================================================================
--- ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
(original)
+++ ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
Tue Apr  3 14:39:22 2012
@@ -88,6 +88,7 @@ import com.vaadin.ui.ProgressIndicator;
 import com.vaadin.ui.Table;
 import com.vaadin.ui.Table.TableTransferable;
 import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
 
 /*
 
@@ -687,7 +688,13 @@ public class VaadinClient extends com.va
             setStyleName("small");
             addListener(new Button.ClickListener() {
                 public void buttonClick(ClickEvent event) {
-                    repository.remove(object);
+                    try {
+                        repository.remove(object);
+                    }
+                    catch (Exception e) {
+                        // ACE-246: notify user when the removal failed!
+                        getWindow().showNotification("Failed to remove item!", "<br/>Reason:
" + e.getMessage(), Notification.TYPE_ERROR_MESSAGE);
+                    }
                 }
             });
         }



Mime
View raw message