james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r834470 - in /james/hupa/trunk/client/src/main/java/org/apache/hupa/client: HupaConstants.java HupaConstants.properties mvp/IMAPMessageListPresenter.java mvp/IMAPMessageListView.java mvp/place/IMAPMessageListPresenterPlace.java
Date Tue, 10 Nov 2009 14:06:27 GMT
Author: norman
Date: Tue Nov 10 14:06:27 2009
New Revision: 834470

URL: http://svn.apache.org/viewvc?rev=834470&view=rev
Log:
Add Button to refresh current mailtable

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.properties
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/place/IMAPMessageListPresenterPlace.java

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.java?rev=834470&r1=834469&r2=834470&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.java Tue Nov
10 14:06:27 2009
@@ -111,4 +111,6 @@
     
     public String markSeen();
     public String markUnseen();
+
+    public String refresh();
 }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.properties
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.properties?rev=834470&r1=834469&r2=834470&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.properties
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaConstants.properties
Tue Nov 10 14:06:27 2009
@@ -66,3 +66,4 @@
 sessionTimedOut=Your session is timed out. Please login again!
 markSeen=Mark seen
 markUnseen=Mark unseen
+refresh=Refresh

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java?rev=834470&r1=834469&r2=834470&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListPresenter.java
Tue Nov 10 14:06:27 2009
@@ -93,6 +93,7 @@
         public HasClickHandlers getMarkUnseenClick();
         public HasEnable getMarkSeenEnable();
         public HasEnable getMarkUnseenEnable();
+        public HasClickHandlers getRefreshClick();
         public void redraw();
     }
 
@@ -275,6 +276,15 @@
             
         }));
         
+        registerHandler(display.getRefreshClick().addClickHandler(new ClickHandler() {
+
+            public void onClick(ClickEvent event) {
+                display.reset();
+                display.reloadData();
+            }
+            
+        }));
+        
         display.addTableListener(tableListener);
     }
 

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java?rev=834470&r1=834469&r2=834470&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessageListView.java
Tue Nov 10 14:06:27 2009
@@ -103,6 +103,7 @@
     private ListBox pageBox = new ListBox();
     private Hyperlink allLink = new Hyperlink(constants.all(),"");    
     private Hyperlink noneLink = new Hyperlink(constants.none(),"");
+    private Hyperlink refreshLink = new Hyperlink(constants.refresh(),"");
 
     
     @Inject
@@ -190,7 +191,7 @@
         markButtonBar.add(markSeenButton);
         markButtonBar.add(markUnSeenButton);
         buttonBar.add(markButtonBar);
-        
+        buttonBar.add(refreshLink);
         pageBox.addItem("20");
         pageBox.addItem("50");
         pageBox.addItem("100");
@@ -667,4 +668,8 @@
     public HasEnable getMarkUnseenEnable() {
         return markUnSeenButton;
     }
+
+    public HasClickHandlers getRefreshClick() {
+        return refreshLink;
+    }
 }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/place/IMAPMessageListPresenterPlace.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/place/IMAPMessageListPresenterPlace.java?rev=834470&r1=834469&r2=834470&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/place/IMAPMessageListPresenterPlace.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/place/IMAPMessageListPresenterPlace.java
Tue Nov 10 14:06:27 2009
@@ -24,6 +24,7 @@
 import com.google.inject.Provider;
 
 import net.customware.gwt.presenter.client.gin.ProvidedPresenterPlace;
+import net.customware.gwt.presenter.client.place.PlaceRequest;
 
 public class IMAPMessageListPresenterPlace extends ProvidedPresenterPlace<IMAPMessageListPresenter>{
 
@@ -36,4 +37,31 @@
     public String getName() {
         return "MessageList";
     }
+
+    @Override
+    protected void preparePresenter(PlaceRequest request, IMAPMessageListPresenter presenter)
{
+        int count = 20;
+        try {
+            count = Integer.parseInt(request.getParameter("count", "20"));
+        } catch (NumberFormatException e) {
+            // ignore
+        }
+        int page = 0;
+        try {
+            page = Integer.parseInt(request.getParameter("page", "0"));
+        } catch (NumberFormatException e) {
+            // ignore
+        }
+        String folder = request.getParameter("folder", "INBOX");
+        presenter.getDisplay();
+        super.preparePresenter(request, presenter);
+    }
+
+    @Override
+    protected PlaceRequest prepareRequest(PlaceRequest request, IMAPMessageListPresenter
presenter) {
+        // TODO Auto-generated method stub
+        return super.prepareRequest(request, presenter);
+    }
+    
+    
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message