Author: dongxu Date: Thu Sep 12 04:20:33 2013 New Revision: 1522333 URL: http://svn.apache.org/r1522333 Log: fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list
Removed: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/FolderListFactory.java Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AbstractActivityMapper.java james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/FolderListActivityMapper.java james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java?rev=1522333&r1=1522332&r2=1522333&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/activity/FolderListActivity.java Thu Sep 12 04:20:33 2013 @@ -21,6 +21,7 @@ package org.apache.hupa.client.activity; <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD import org.apache.hupa.shared.events.RefreshUnreadEvent; import org.apache.hupa.shared.events.RefreshUnreadEventHandler; @@ -31,10 +32,11 @@ import com.google.gwt.user.client.ui.IsW ======= import org.apache.hupa.client.ioc.FolderListFactory; >>>>>>> use GinFactoryModuleBuilder to inject multiple displayable instances >>>>>>> of some activities +======= +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list import org.apache.hupa.client.ui.WidgetDisplayable; import com.google.gwt.event.shared.EventBus; -import com.google.gwt.place.shared.Place; import com.google.gwt.user.client.ui.AcceptsOneWidget; >>>>>>> integrate all of the views to their corresponding activities and >>>>>>> mappers import com.google.inject.Inject; @@ -44,18 +46,19 @@ public class FolderListActivity extends <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD @Inject private Displayable display; ======= @Inject private FolderListFactory folderListFactory; private Place place; private Displayable display; >>>>>>> use GinFactoryModuleBuilder to inject multiple displayable instances >>>>>>> of some activities +======= + @Inject private Displayable display; +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list @Override public void start(AcceptsOneWidget container, EventBus eventBus) { - if (display == null) { - display = folderListFactory.create(place); - } container.setWidget(display.asWidget()); bindTo(eventBus); } @@ -85,6 +88,7 @@ public class FolderListActivity extends } <<<<<<< HEAD +<<<<<<< HEAD @Inject private Displayable display; public interface Displayable extends WidgetDisplayable {} @@ -100,6 +104,8 @@ public class FolderListActivity extends } >>>>>>> use GinFactoryModuleBuilder to inject multiple displayable instances >>>>>>> of some activities +======= +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list public interface Displayable extends WidgetDisplayable { } >>>>>>> make reload mail folder place work, fixed issue #7 Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java?rev=1522333&r1=1522332&r2=1522333&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ioc/AppGinModule.java Thu Sep 12 04:20:33 2013 @@ -230,6 +230,7 @@ import org.apache.hupa.client.mapper.Mes import org.apache.hupa.client.mapper.NavigationActivityMapper; import org.apache.hupa.client.mapper.StatusActivityMapper; import org.apache.hupa.client.mapper.ToolBarActivityMapper; +<<<<<<< HEAD import org.apache.hupa.client.mapper.TopBarActivityMapper; <<<<<<< HEAD >>>>>>> integrate all of the views to their corresponding activities and >>>>>>> mappers @@ -237,6 +238,8 @@ import org.apache.hupa.client.mapper.Wes >>>>>>> delete messages, make WestActivity Singleton ======= >>>>>>> make message list view panel work as expected partly +======= +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list import org.apache.hupa.client.place.DefaultPlace; import org.apache.hupa.client.rf.HupaRequestFactory; import org.apache.hupa.client.ui.ComposeToolBarView; @@ -283,7 +286,6 @@ import com.google.gwt.core.client.GWT; import com.google.gwt.event.shared.EventBus; import com.google.gwt.event.shared.SimpleEventBus; import com.google.gwt.inject.client.AbstractGinModule; -import com.google.gwt.inject.client.assistedinject.GinFactoryModuleBuilder; import com.google.gwt.place.shared.PlaceController; import com.google.gwt.place.shared.PlaceHistoryHandler; import com.google.gwt.place.shared.PlaceHistoryMapper; @@ -527,9 +529,6 @@ public class AppGinModule extends Abstra bind(ToolBarActivity.class).in(Singleton.class); bind(FolderListActivity.class).in(Singleton.class); bind(MessageListActivity.class).in(Singleton.class); - // bind(MessageListFooterActivity.class).in(Singleton.class); - // bind(MessageContentActivity.class).in(Singleton.class); - // bind(StatusActivity.class).in(Singleton.class); bind(ComposeToolBarActivity.class).in(Singleton.class); bind(ComposeActivity.class).in(Singleton.class); @@ -538,7 +537,11 @@ public class AppGinModule extends Abstra bind(TopActivity.Displayable.class).to(TopView.class); ======= bind(TopActivity.Displayable.class).to(TopView.class).in(Singleton.class); +<<<<<<< HEAD >>>>>>> try to fix some issues by reorganize the activity mapper and place >>>>>>> controller +======= + bind(FolderListActivity.Displayable.class).to(FolderListView.class); +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list bind(WestActivity.Displayable.class).to(WestView.class).in(Singleton.class); bind(IMAPMessageListActivity.Displayable.class).to(IMAPMessageListView.class); bind(MessageSendActivity.Displayable.class).to(MessageSendView.class); @@ -593,9 +596,9 @@ public class AppGinModule extends Abstra // Places bind(PlaceHistoryMapper.class).to(AppPlaceHistoryMapper.class).in(Singleton.class); - // Application EventBus bind(EventBus.class).to(SimpleEventBus.class).in(Singleton.class); +<<<<<<< HEAD // Application Controller <<<<<<< HEAD <<<<<<< HEAD @@ -620,6 +623,9 @@ public class AppGinModule extends Abstra install(new GinFactoryModuleBuilder().implement(FolderListActivity.Displayable.class, FolderListView.class) .build(FolderListFactory.class)); // bind(ExceptionHandler.class).to(DefaultExceptionHandler.class); +======= + bind(HupaController.class).in(Singleton.class); +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list } <<<<<<< HEAD <<<<<<< HEAD Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AbstractActivityMapper.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AbstractActivityMapper.java?rev=1522333&r1=1522332&r2=1522333&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AbstractActivityMapper.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/AbstractActivityMapper.java Thu Sep 12 04:20:33 2013 @@ -14,6 +14,6 @@ abstract class AbstractActivityMapper im return getAppActivity(place); } - abstract Activity getAppActivity(Place place); + abstract Activity getAppActivity(final Place place); } Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/FolderListActivityMapper.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/FolderListActivityMapper.java?rev=1522333&r1=1522332&r2=1522333&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/FolderListActivityMapper.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/mapper/FolderListActivityMapper.java Thu Sep 12 04:20:33 2013 @@ -24,6 +24,7 @@ import org.apache.hupa.client.activity.F <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD import org.apache.hupa.client.place.SettingPlace; import com.google.gwt.activity.shared.Activity; @@ -45,6 +46,10 @@ import com.google.gwt.activity.shared.Ac <<<<<<< HEAD >>>>>>> integrate all of the views to their corresponding activities and >>>>>>> mappers ======= +======= + +import com.google.gwt.activity.shared.Activity; +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list import com.google.gwt.core.client.GWT; import com.google.gwt.core.client.RunAsyncCallback; >>>>>>> support code split @@ -53,10 +58,14 @@ import com.google.inject.Inject; import com.google.inject.Provider; <<<<<<< HEAD +<<<<<<< HEAD public class FolderListActivityMapper extends _HupaActivityMapper { ======= public class FolderListActivityMapper implements ActivityMapper { >>>>>>> integrate all of the views to their corresponding activities and >>>>>>> mappers +======= +public class FolderListActivityMapper extends AbstractActivityMapper { +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list private final Provider<FolderListActivity> folderListActivityProvider; @Inject @@ -67,15 +76,21 @@ public class FolderListActivityMapper im <<<<<<< HEAD <<<<<<< HEAD +<<<<<<< HEAD @Override Activity asyncLoadActivity(final Place place) { if (place instanceof SettingPlace) return null; +======= + @Override + Activity getAppActivity(final Place place) { +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list return new ActivityAsyncProxy() { @Override protected void doAsync(RunAsyncCallback callback) { GWT.runAsync(callback); } +<<<<<<< HEAD @Override protected Activity createInstance() { @@ -104,15 +119,20 @@ public class FolderListActivityMapper im protected void doAsync(RunAsyncCallback callback) { GWT.runAsync(callback); } +======= +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list - @Override - protected Activity createInstance() { - return folderListActivityProvider.get().with(place); - } - }; + @Override + protected Activity createInstance() { + return folderListActivityProvider.get(); + } + }; +<<<<<<< HEAD } return null; >>>>>>> support code split +======= +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list } } Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java?rev=1522333&r1=1522332&r2=1522333&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.java Thu Sep 12 04:20:33 2013 @@ -218,34 +218,23 @@ import java.util.logging.Logger; ======= >>>>>>> scrub code import org.apache.hupa.client.activity.FolderListActivity; -import org.apache.hupa.client.place.ComposePlace; >>>>>>> integrate all of the views to their corresponding activities and >>>>>>> mappers import com.google.gwt.core.client.GWT; -import com.google.gwt.event.shared.EventBus; -import com.google.gwt.place.shared.Place; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; -import com.google.gwt.user.cellview.client.CellTree; import com.google.gwt.user.client.ui.Composite; -import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.SimplePanel; -import com.google.inject.assistedinject.Assisted; -import com.google.inject.assistedinject.AssistedInject; +import com.google.inject.Inject; -public class FolderListView extends Composite implements - FolderListActivity.Displayable { +public class FolderListView extends Composite implements FolderListActivity.Displayable { @UiField SimplePanel thisView; private RightCellTree cellTree; - // FIXME here we can not support another cell tree, since both of their - // style - // would not be cleared. - private HTMLPanel contactPanel; - - @AssistedInject - public FolderListView(final FoldersTreeViewModel viewModel, - final EventBus eventBus, @Assisted Place place) { + + @Inject + public FolderListView(final FoldersTreeViewModel viewModel) { initWidget(binder.createAndBindUi(this)); +<<<<<<< HEAD // if (place instanceof ComposePlace) { // contactPanel = new HTMLPanel("contacts list"); // if (thisView.getWidget() != null @@ -272,12 +261,16 @@ public class FolderListView extends Comp ======= // } >>>>>>> fixed issue#32 +======= + cellTree = new RightCellTree(viewModel); + cellTree.setAnimationEnabled(true); + thisView.add(cellTree); +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list } interface FolderListUiBinder extends UiBinder<SimplePanel, FolderListView> { } - private static FolderListUiBinder binder = GWT - .create(FolderListUiBinder.class); + private static FolderListUiBinder binder = GWT.create(FolderListUiBinder.class); } Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java?rev=1522333&r1=1522332&r2=1522333&view=diff ============================================================================== --- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java (original) +++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java Thu Sep 12 04:20:33 2013 @@ -33,6 +33,7 @@ import java.util.logging.Logger; import org.apache.hupa.client.activity.MessageListActivity; <<<<<<< HEAD +<<<<<<< HEAD import org.apache.hupa.shared.domain.Message; import com.google.gwt.core.client.GWT; @@ -66,6 +67,9 @@ import java.util.List; >>>>>>> add click handler to every message row import org.apache.hupa.client.activity.MessageListActivity; ======= +======= +import org.apache.hupa.client.place.DefaultPlace; +>>>>>>> fixed issue#45, issue#47, issue#51. change the layout of composite, don't use contact instead of folders list import org.apache.hupa.client.place.MailFolderPlace; >>>>>>> make reload message content work, use the same place with folder list, >>>>>>> while separated with slash, that looks like Gmail's import org.apache.hupa.client.rf.FetchMessagesRequest; @@ -108,6 +112,7 @@ public class MessageListView extends Com @UiField(provided = true) MessagesCellTable grid; private HupaRequestFactory requestFactory; + private PlaceController placeController; private ImapFolder folder; private String searchValue; private User user; @@ -117,6 +122,7 @@ public class MessageListView extends Com public MessageListView(final EventBus eventBus, final HupaRequestFactory requestFactory, final PlaceController placeController, final MessagesCellTable table) { this.requestFactory = requestFactory; + this.placeController = placeController; grid = table; initWidget(binder.createAndBindUi(this)); grid.addCellPreviewHandler(new Handler<Message>() { @@ -212,6 +218,7 @@ public class MessageListView extends Com @Override public void onFailure(ServerFailure error) { + placeController.goTo(new DefaultPlace("@")); if (error.isFatal()) { // FIXME should goto login page regarding the long time // session expired. --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org