james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nor...@apache.org
Subject svn commit: r833858 - in /james/hupa/trunk: ./ .settings/ client/src/main/java/org/apache/hupa/client/ client/src/main/java/org/apache/hupa/client/mvp/
Date Sun, 08 Nov 2009 11:31:15 GMT
Author: norman
Date: Sun Nov  8 11:31:14 2009
New Revision: 833858

URL: http://svn.apache.org/viewvc?rev=833858&view=rev
Log:
Replace gwt-presenter-1.0.0 with gwt-presenter-1.1.0-replace-SNAPSHOT ( this will be the next
version of the library)

Added:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaWidgetDisplay.java
Modified:
    james/hupa/trunk/.settings/org.eclipse.jdt.core.prefs
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/Hupa.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/AppPresenter.java
    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/IMAPMessagePresenter.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/LoginPresenter.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MainPresenter.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MessageSendPresenter.java
    james/hupa/trunk/pom.xml

Modified: james/hupa/trunk/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/james/hupa/trunk/.settings/org.eclipse.jdt.core.prefs?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/.settings/org.eclipse.jdt.core.prefs (original)
+++ james/hupa/trunk/.settings/org.eclipse.jdt.core.prefs Sun Nov  8 11:31:14 2009
@@ -1,4 +1,4 @@
-#Thu Oct 15 13:14:02 CEST 2009
+#Fri Nov 06 16:11:29 CET 2009
 eclipse.preferences.version=1
 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
 org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
@@ -256,13 +256,13 @@
 org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
 org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
-org.eclipse.jdt.core.formatter.lineSplit=80
+org.eclipse.jdt.core.formatter.lineSplit=200
 org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
 org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
 org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
 org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
-org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.char=space
 org.eclipse.jdt.core.formatter.tabulation.size=4
-org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
 org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/Hupa.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/Hupa.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/Hupa.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/Hupa.java Sun Nov  8 11:31:14
2009
@@ -19,9 +19,7 @@
 
 package org.apache.hupa.client;
 
-import net.customware.gwt.presenter.client.EventBus;
 import net.customware.gwt.presenter.client.place.PlaceManager;
-import net.customware.gwt.presenter.client.place.PlaceRequestEvent;
 
 import org.apache.hupa.client.gin.HupaGinjector;
 import org.apache.hupa.client.mvp.AppPresenter;
@@ -45,12 +43,8 @@
         aPres.bind();
        
         RootPanel.get().add(aPres.getDisplay().asWidget());
-        EventBus bus = injector.getEventBus();
-        // Needed because of this bug:
-        // http://code.google.com/p/gwt-presenter/issues/detail?id=6
-        PlaceManager placeManager = injector.getPlaceManager();
-        bus.addHandler( PlaceRequestEvent.getType(), placeManager );
 
+        PlaceManager placeManager = injector.getPlaceManager();
         placeManager.fireCurrentPlace();
     }
 

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaCallback.java Sun Nov
 8 11:31:14 2009
@@ -20,7 +20,6 @@
 package org.apache.hupa.client;
 
 import net.customware.gwt.dispatch.client.DispatchAsync;
-import net.customware.gwt.presenter.client.Display;
 import net.customware.gwt.presenter.client.EventBus;
 
 import org.apache.hupa.shared.events.LogoutEvent;
@@ -39,12 +38,13 @@
     private EventBus eventBus = null;
     private ServerStatusEvent available = new ServerStatusEvent(ServerStatus.Available);

     private ServerStatusEvent unavailable = new ServerStatusEvent(ServerStatus.Unavailable);

-    private Display display = null;
+    private HupaWidgetDisplay display = null;
 
     @Inject
-    public HupaCallback(DispatchAsync dispatcher, EventBus bus, Display display) {
+    public HupaCallback(DispatchAsync dispatcher, EventBus bus, HupaWidgetDisplay display)
{
         this(dispatcher, bus);
         this.display = display;
+        
         this.display.startProcessing();
     }
     

Added: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaWidgetDisplay.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaWidgetDisplay.java?rev=833858&view=auto
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaWidgetDisplay.java (added)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/HupaWidgetDisplay.java Sun
Nov  8 11:31:14 2009
@@ -0,0 +1,28 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.hupa.client;
+
+import net.customware.gwt.presenter.client.widget.WidgetDisplay;
+
+public interface HupaWidgetDisplay extends WidgetDisplay{
+
+    public void startProcessing();
+    public void stopProcessing();
+}

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/AppPresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/AppPresenter.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/AppPresenter.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/AppPresenter.java Sun
Nov  8 11:31:14 2009
@@ -22,8 +22,6 @@
 
 import net.customware.gwt.dispatch.client.DispatchAsync;
 import net.customware.gwt.presenter.client.EventBus;
-import net.customware.gwt.presenter.client.place.Place;
-import net.customware.gwt.presenter.client.place.PlaceRequest;
 import net.customware.gwt.presenter.client.widget.WidgetDisplay;
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
 
@@ -102,12 +100,6 @@
     }
 
     @Override
-    public Place getPlace() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    @Override
     protected void onBind() {
         registerHandler(eventBus.addHandler(LoginEvent.TYPE, new LoginEventHandler() {
 
@@ -168,10 +160,6 @@
         checkSession();
     }
     
-    @Override
-    protected void onPlaceRequest(PlaceRequest request) {
-        // TODO Auto-generated method stub
-    }
 
     @Override
     protected void onUnbind() {
@@ -179,16 +167,6 @@
         mainPresenter.unbind();
     }
 
-    public void refreshDisplay() {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public void revealDisplay() {
-        // TODO Auto-generated method stub
-        
-    }
-
     private void doLogout() {
         if (user != null) {
             dispatcher.execute(new LogoutUser(), new HupaCallback<LogoutUserResult>(dispatcher,
eventBus) {
@@ -232,6 +210,12 @@
                 });
             }
         }
+    }
+
+    @Override
+    protected void onRevealDisplay() {
+        // TODO Auto-generated method stub
+        
     };
 
 }

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=833858&r1=833857&r2=833858&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
Sun Nov  8 11:31:14 2009
@@ -23,12 +23,10 @@
 
 import net.customware.gwt.dispatch.client.DispatchAsync;
 import net.customware.gwt.presenter.client.EventBus;
-import net.customware.gwt.presenter.client.place.Place;
-import net.customware.gwt.presenter.client.place.PlaceRequest;
-import net.customware.gwt.presenter.client.widget.WidgetDisplay;
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
 
 import org.apache.hupa.client.HupaCallback;
+import org.apache.hupa.client.HupaWidgetDisplay;
 import org.apache.hupa.client.widgets.HasDialog;
 import org.apache.hupa.shared.data.IMAPFolder;
 import org.apache.hupa.shared.data.Message;
@@ -65,7 +63,7 @@
 @SuppressWarnings("deprecation")
 public class IMAPMessageListPresenter extends WidgetPresenter<IMAPMessageListPresenter.Display>{
     
-    public interface Display extends WidgetDisplay{
+    public interface Display extends HupaWidgetDisplay {
         public HasRowSelectionHandlers getDataTableSelection();
         public HasPageLoadHandlers getDataTableLoad();
         public void addTableListener(TableListener listener) ;
@@ -103,20 +101,13 @@
     private String searchValue;
     private DispatchAsync dispatcher;
     private ShowMessageTableListener tableListener = new ShowMessageTableListener();
-    private boolean isBound = false;
-    public final static Place PLACE = new Place("IMAPMessageList");
-    
+    private boolean isBound = false;    
     
     @Inject
     public IMAPMessageListPresenter(IMAPMessageListPresenter.Display display,EventBus bus,DispatchAsync
dispatcher) {
         super(display,bus);
         this.dispatcher = dispatcher;
     }
-    
-    @Override
-    public Place getPlace() {
-        return PLACE;
-    }
 
     @Override
     protected void onBind() {
@@ -310,15 +301,6 @@
         //refreshDisplay();
     }
 
-    /*
-     * (non-Javadoc)
-     * @see net.customware.gwt.presenter.client.BasicPresenter#onPlaceRequest(net.customware.gwt.presenter.client.place.PlaceRequest)
-     */
-    protected void onPlaceRequest(PlaceRequest request) {
-        // TODO Auto-generated method stub
-        
-    }
-
 
     /*
      * (non-Javadoc)
@@ -332,24 +314,6 @@
         isBound = false;
     }
 
-    /*
-     * (non-Javadoc)
-     * @see net.customware.gwt.presenter.client.Presenter#refreshDisplay()
-     */
-    public void refreshDisplay() {
-        display.reset();
-        display.deselectAllMessages();
-
-        display.reloadData(user, folder, searchValue);
-    }
-
-    /*
-     * (non-Javadoc)
-     * @see net.customware.gwt.presenter.client.Presenter#revealDisplay()
-     */
-    public void revealDisplay() {
-        display.redraw();
-    }
     
     private final class ShowMessageTableListener implements TableListener {
 
@@ -371,6 +335,16 @@
             eventBus.fireEvent(new ExpandMessageEvent(user,folder,message));
         }
 
+    }
+
+    @Override
+    protected void onRevealDisplay() {
+        display.reset();
+        display.deselectAllMessages();
+
+        display.reloadData(user, folder, searchValue);
+        display.redraw();      
+        
     };
     
   

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessagePresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessagePresenter.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessagePresenter.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/IMAPMessagePresenter.java
Sun Nov  8 11:31:14 2009
@@ -23,13 +23,11 @@
 import java.util.List;
 
 import net.customware.gwt.presenter.client.EventBus;
-import net.customware.gwt.presenter.client.place.Place;
-import net.customware.gwt.presenter.client.place.PlaceRequest;
-import net.customware.gwt.presenter.client.widget.WidgetDisplay;
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
 
 import org.apache.hupa.client.CachingDispatchAsync;
 import org.apache.hupa.client.HupaCallback;
+import org.apache.hupa.client.HupaWidgetDisplay;
 import org.apache.hupa.client.widgets.HasDialog;
 import org.apache.hupa.client.widgets.HasURL;
 import org.apache.hupa.shared.Util;
@@ -55,7 +53,7 @@
 
 public class IMAPMessagePresenter extends WidgetPresenter<IMAPMessagePresenter.Display>{
 
-    public interface Display extends WidgetDisplay{
+    public interface Display extends HupaWidgetDisplay{
         public HasText getFrom();
 
         public HasText getTo();
@@ -75,7 +73,6 @@
         public void setAttachments(List<MessageAttachment> attachements, String folder,
 long uid);
     }
 
-    public static final Place PLACE = new Place("IMAPMessage");
     private MessageDetails messageDetails;
     private Message message;
     private CachingDispatchAsync dispatcher;
@@ -98,7 +95,7 @@
         if (isBound == false) { 
             bind();
         }
-        refreshDisplay();
+        updateDisplay();
     }
 
     private void updateDisplay() {
@@ -115,11 +112,6 @@
         display.getContent().setHTML(con);
         display.setAttachments(messageDetails.getMessageAttachments(), folder.getFullName(),message.getUid());
     }
-    
-    @Override
-    public Place getPlace() {
-        return PLACE;
-    }
 
     @Override
     protected void onBind() {
@@ -179,43 +171,15 @@
         isBound = true;
     }
 
-    @Override
-    protected void onPlaceRequest(PlaceRequest request) {
-        String from = request.getParameter("from", user.getName());
-        display.getFrom().setText(from);
-
-        
-        String to = request.getParameter("to", null);
-        if (to != null) {
-            display.getTo().setText(to);
-        }
-        
-        String cc = request.getParameter("cc", null);
-        if (cc != null) {
-            display.getCc().setText(cc);
-        }
-        
-        String subject = request.getParameter("subject", null);
-        if (subject != null) {
-            display.getSubject().setText(subject);
-        }
-        
-        String bodytext = request.getParameter("bodytext", null);
-        if (bodytext != null) {
-            display.getContent().setText(bodytext);
-        }
-    }
 
     @Override
     protected void onUnbind() {
         isBound = false;
     }
 
-    public void refreshDisplay() {
-        updateDisplay();
-    }
 
-    public void revealDisplay() {
+    @Override
+    protected void onRevealDisplay() {
         // TODO Auto-generated method stub
         
     }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/LoginPresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/LoginPresenter.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/LoginPresenter.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/LoginPresenter.java Sun
Nov  8 11:31:14 2009
@@ -21,13 +21,11 @@
 
 import net.customware.gwt.dispatch.client.DispatchAsync;
 import net.customware.gwt.presenter.client.EventBus;
-import net.customware.gwt.presenter.client.place.Place;
-import net.customware.gwt.presenter.client.place.PlaceRequest;
-import net.customware.gwt.presenter.client.widget.WidgetDisplay;
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
 
 import org.apache.hupa.client.HupaCallback;
 import org.apache.hupa.client.HupaConstants;
+import org.apache.hupa.client.HupaWidgetDisplay;
 import org.apache.hupa.shared.events.LoginEvent;
 import org.apache.hupa.shared.events.SessionExpireEvent;
 import org.apache.hupa.shared.events.SessionExpireEventHandler;
@@ -46,7 +44,7 @@
 public class LoginPresenter extends WidgetPresenter<LoginPresenter.Display>{
     private HupaConstants constants = GWT.create(HupaConstants.class);
 
-    public interface Display extends WidgetDisplay{
+    public interface Display extends HupaWidgetDisplay{
         public HasClickHandlers getLoginClick();
         public HasClickHandlers getResetClick();
         public HasValue<String> getUserNameValue();
@@ -56,7 +54,6 @@
     }
     
     private DispatchAsync dispatcher;
-    public static final Place PLACE = new Place("Login");
 
     @Inject
     public LoginPresenter(LoginPresenter.Display display,EventBus bus,DispatchAsync dispatcher)
{
@@ -92,11 +89,6 @@
     }
 
     @Override
-    public Place getPlace() {
-        return PLACE;
-    }
-
-    @Override
     protected void onBind() {
         registerHandler(display.getLoginClick().addClickHandler(new ClickHandler() {
 
@@ -123,25 +115,13 @@
     }
 
     @Override
-    protected void onPlaceRequest(PlaceRequest request) {
-        String username = request.getParameter("username",null);
-        if (username != null) {
-            display.getUserNameValue().setValue(username);
-        }
-    }
-
-    @Override
     protected void onUnbind() {
         // TODO Auto-generated method stub
         
     }
 
-    public void refreshDisplay() {
-        // TODO Auto-generated method stub
-    
-    }
-
-    public void revealDisplay() {
+    @Override
+    protected void onRevealDisplay() {
         // TODO Auto-generated method stub
         
     }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MainPresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MainPresenter.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MainPresenter.java (original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MainPresenter.java Sun
Nov  8 11:31:14 2009
@@ -25,13 +25,11 @@
 import java.util.List;
 
 import net.customware.gwt.presenter.client.EventBus;
-import net.customware.gwt.presenter.client.place.Place;
-import net.customware.gwt.presenter.client.place.PlaceRequest;
-import net.customware.gwt.presenter.client.widget.WidgetDisplay;
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
 
 import org.apache.hupa.client.CachingDispatchAsync;
 import org.apache.hupa.client.HupaCallback;
+import org.apache.hupa.client.HupaWidgetDisplay;
 import org.apache.hupa.client.mvp.MessageSendPresenter.Type;
 import org.apache.hupa.client.widgets.HasDialog;
 import org.apache.hupa.client.widgets.IMAPTreeItem;
@@ -90,7 +88,7 @@
 
 public class MainPresenter extends WidgetPresenter<MainPresenter.Display> {
 
-    public interface Display extends WidgetDisplay {
+    public interface Display extends HupaWidgetDisplay {
         public HasClickHandlers getSearchClick();
 
         public HasValue<String> getSearchValue();
@@ -139,8 +137,7 @@
     private MessageSendPresenter sendPresenter;
     private IMAPTreeItem tItem;
     private HasEditable editableTreeItem;
-    public static final Place PLACE = new Place("Main");
-
+    
     @Inject
     public MainPresenter(MainPresenter.Display display, EventBus bus, CachingDispatchAsync
cachingDispatcher, IMAPMessageListPresenter messageListPresenter, IMAPMessagePresenter messagePresenter,
             MessageSendPresenter sendPresenter) {
@@ -235,7 +232,7 @@
 
         messageListPresenter.bind(user, folder);
         if (refresh) {
-            messageListPresenter.refreshDisplay();
+            messageListPresenter.revealDisplay();
         }
         display.setCenter(messageListPresenter.getDisplay().asWidget());
     }
@@ -282,17 +279,13 @@
         cachingDispatcher.clear();
     }
 
-    @Override
-    public Place getPlace() {
-        return PLACE;
-    }
 
     public void bind(User user) {
         this.user = user;
         folder = new IMAPFolder(user.getSettings().getInboxFolderName());
 
         bind();
-        refreshDisplay();
+        revealDisplay();
     }
 
     @Override
@@ -527,9 +520,6 @@
 
     }
 
-    @Override
-    protected void onPlaceRequest(PlaceRequest request) {
-    }
 
     @Override
     protected void onUnbind() {
@@ -540,13 +530,9 @@
 
     }
 
-    public void refreshDisplay() {
+    @Override
+    protected void onRevealDisplay() {
         loadTreeItems();
         showMessageTable(user, folder, null, true);
     }
-
-    public void revealDisplay() {
-        // TODO Auto-generated method stub
-
-    }
 }

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MessageSendPresenter.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MessageSendPresenter.java?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MessageSendPresenter.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mvp/MessageSendPresenter.java
Sun Nov  8 11:31:14 2009
@@ -23,12 +23,10 @@
 
 import net.customware.gwt.dispatch.client.DispatchAsync;
 import net.customware.gwt.presenter.client.EventBus;
-import net.customware.gwt.presenter.client.place.Place;
-import net.customware.gwt.presenter.client.place.PlaceRequest;
-import net.customware.gwt.presenter.client.widget.WidgetDisplay;
 import net.customware.gwt.presenter.client.widget.WidgetPresenter;
 
 import org.apache.hupa.client.HupaCallback;
+import org.apache.hupa.client.HupaWidgetDisplay;
 import org.apache.hupa.client.validation.EmailListValidator;
 import org.apache.hupa.client.validation.NotEmptyValidator;
 import org.apache.hupa.shared.Util;
@@ -70,9 +68,7 @@
 
 public class MessageSendPresenter extends WidgetPresenter<MessageSendPresenter.Display>{
 
-    private User user;
     private DispatchAsync dispatcher;
-    public static final Place PLACE = new Place("MessageSend");
     private ArrayList<MessageAttachment> attachments = new ArrayList<MessageAttachment>();
     private Type type = Type.NEW;
     private IMAPFolder folder;
@@ -143,7 +139,7 @@
         FORWARD
     }
     
-    public interface Display extends WidgetDisplay {
+    public interface Display extends HupaWidgetDisplay {
         public HasText getFromText();
         public HasText getToText();
         public HasText getCcText();
@@ -156,12 +152,7 @@
         public void resetUploader();
         public HasClickHandlers getBackButtonClick();
     }
-
-    @Override
-    public Place getPlace() {
-        return PLACE;
-    }
-
+    
     @Override
     protected void onBind() {
         registerHandler(eventBus.addHandler(LoadMessagesEvent.TYPE, new LoadMessagesEventHandler()
{
@@ -295,37 +286,7 @@
         type = Type.NEW;
     }
 
-    @Override
-    protected void onPlaceRequest(PlaceRequest request) {
-        String from = request.getParameter("from", user.getName());
-        display.getFromText().setText(from);
-
-        
-        String to = request.getParameter("to", null);
-        if (to != null) {
-            display.getToText().setText(to);
-        }
-        
-        String cc = request.getParameter("cc", null);
-        if (cc != null) {
-            display.getCcText().setText(cc);
-        }
-        
-        String bcc = request.getParameter("bcc", null);
-        if (bcc != null) {
-            display.getBccText().setText(bcc);
-        }
-        
-        String subject = request.getParameter("subject", null);
-        if (subject != null) {
-            display.getSubjectText().setText(subject);
-        }
-        
-        String bodytext = request.getParameter("bodytext", null);
-        if (bodytext != null) {
-            display.getMessageText().setText(bodytext);
-        }
-    }
+   
 
     @Override
     protected void onUnbind() {
@@ -333,21 +294,10 @@
         display.getUploader().cancel();
     }
 
-    public void refreshDisplay() {
-        // TODO Auto-generated method stub
-        
-    }
-
-    public void revealDisplay() {
-        // TODO Auto-generated method stub
-        
-    }
-    
     public void bind(User user, IMAPFolder folder, Message oldmessage, MessageDetails oldDetails,
Type type) {
         this.oldmessage = oldmessage;
         this.oldDetails = oldDetails;
         this.folder = folder;
-        this.user = user;
         this.type = type;
         
         bind();
@@ -389,5 +339,11 @@
     public void bind(User user, Type type) {
         bind(user,null,null,null, type);
     }
+
+    @Override
+    protected void onRevealDisplay() {
+        // TODO Auto-generated method stub
+        
+    }
     
 }

Modified: james/hupa/trunk/pom.xml
URL: http://svn.apache.org/viewvc/james/hupa/trunk/pom.xml?rev=833858&r1=833857&r2=833858&view=diff
==============================================================================
--- james/hupa/trunk/pom.xml (original)
+++ james/hupa/trunk/pom.xml Sun Nov  8 11:31:14 2009
@@ -304,7 +304,7 @@
 				<groupId>net.customware.gwt.presenter
 				</groupId>
 				<artifactId>gwt-presenter</artifactId>
-				<version>1.0.0</version>
+				<version>1.1.0-replace-SNAPSHOT</version>
 			</dependency>
 			<dependency>
 				<groupId>com.google.gwt</groupId>



---------------------------------------------------------------------
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