ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1083608 - /incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
Date Sun, 20 Mar 2011 22:57:54 GMT
Author: marrs
Date: Sun Mar 20 22:57:54 2011
New Revision: 1083608

URL: http://svn.apache.org/viewvc?rev=1083608&view=rev
Log:
More cleanup, added a few error messages as well.

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

Modified: incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java?rev=1083608&r1=1083607&r2=1083608&view=diff
==============================================================================
--- incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
(original)
+++ incubator/ace/trunk/ace-webui-vaadin/src/main/java/org/apache/ace/webui/vaadin/VaadinClient.java
Sun Mar 20 22:57:54 2011
@@ -108,6 +108,7 @@ import com.vaadin.ui.Upload.FailedEvent;
 import com.vaadin.ui.Upload.SucceededEvent;
 import com.vaadin.ui.VerticalLayout;
 import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.Notification;
 
 /*
 
@@ -211,14 +212,12 @@ public class VaadinClient extends com.va
     }
     
     public void stop() {
-        System.out.println("STOP " + this);
         synchronized (this) {
         	m_dependenciesResolved = false;
         }
     }
     
     public void destroyDependencies() {
-        System.out.println("DESTROY " + this);
         m_sessionFactory.destroySession(m_sessionID);
         FileUtils.removeDirectoryWithContent(m_sessionDir);
     }
@@ -500,10 +499,14 @@ public class VaadinClient extends com.va
             public void buttonClick(ClickEvent event) {
                 try {
                     m_admin.checkout();
-                    System.out.println("checkout");
                     updateTableData();
                 }
                 catch (IOException e) {
+                    getMainWindow().showNotification(
+                        "Retrieve failed",
+                        "Failed to retrieve the data from the server.<br />" +
+                        "Reason: " + e.getMessage(),
+                        Notification.TYPE_ERROR_MESSAGE);
                     // TODO Auto-generated catch block
                     e.printStackTrace();
                 }
@@ -516,11 +519,13 @@ public class VaadinClient extends com.va
             public void buttonClick(ClickEvent event) {
                 try {
                     m_admin.commit();
-                    System.out.println("commit");
                 }
                 catch (IOException e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
+                    getMainWindow().showNotification(
+                        "Commit failed",
+                        "Failed to commit the changes to the server.<br />" +
+                        "Reason: " + e.getMessage(),
+                        Notification.TYPE_ERROR_MESSAGE);
                 }
             }
         });
@@ -530,12 +535,14 @@ public class VaadinClient extends com.va
             public void buttonClick(ClickEvent event) {
                 try {
                     m_admin.revert();
-                    System.out.println("revert");
                     updateTableData();
                 }
                 catch (IOException e) {
-                    // TODO Auto-generated catch block
-                    e.printStackTrace();
+                    getMainWindow().showNotification(
+                        "Revert failed",
+                        "Failed to revert your changes.<br />" +
+                        "Reason: " + e.getMessage(),
+                        Notification.TYPE_ERROR_MESSAGE);
                 }
             }
         });



Mime
View raw message