james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From don...@apache.org
Subject svn commit: r1522382 - in /james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui: MessageListView.java MessagesCellTable.java
Date Thu, 12 Sep 2013 04:43:51 GMT
Author: dongxu
Date: Thu Sep 12 04:43:51 2013
New Revision: 1522382

URL: http://svn.apache.org/r1522382
Log:
remove useless code

Modified:
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessageListView.java
    james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java

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=1522382&r1=1522381&r2=1522382&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:43:51 2013
@@ -96,12 +96,10 @@ import com.google.gwt.core.client.GWT;
 import com.google.gwt.event.shared.EventBus;
 import com.google.gwt.uibinder.client.UiBinder;
 import com.google.gwt.uibinder.client.UiField;
-import com.google.gwt.user.cellview.client.DataGrid;
 import com.google.gwt.user.client.ui.Composite;
 import com.google.gwt.user.client.ui.SimpleLayoutPanel;
 import com.google.gwt.user.client.ui.SimplePanel;
 import com.google.gwt.view.client.MultiSelectionModel;
-import com.google.gwt.view.client.NoSelectionModel;
 import com.google.inject.Inject;
 
 public class MessageListView extends Composite implements MessageListActivity.Displayable
{
@@ -261,8 +259,6 @@ public class MessageListView extends Com
 		List<Long> selecteds = new ArrayList<Long>();
 		MultiSelectionModel<? super Message> selectionModel = (MultiSelectionModel<? super
Message>) grid
 				.getSelectionModel();
-//		NoSelectionModel<? super Message> noSelectionModel = (NoSelectionModel<? super
Message>)grid.getSelectionModel();
-		
 		selectionModel.getSelectedSet();
 		for (Message msg : getSelectedMessages()) {
 			selecteds.add(msg.getUid());

Modified: james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
URL: http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java?rev=1522382&r1=1522381&r2=1522382&view=diff
==============================================================================
--- james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
(original)
+++ james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/MessagesCellTable.java
Thu Sep 12 04:43:51 2013
@@ -506,20 +506,15 @@ import org.apache.hupa.client.HupaConsta
 import org.apache.hupa.client.HupaController;
 import org.apache.hupa.client.activity.ToolBarActivity;
 import org.apache.hupa.client.bundles.HupaImageBundle;
-import org.apache.hupa.client.place.AbstractPlace;
 import org.apache.hupa.client.place.FolderPlace;
 import org.apache.hupa.client.place.MessagePlace;
 import org.apache.hupa.client.rf.FetchMessagesRequest;
-import org.apache.hupa.client.rf.GetMessageDetailsRequest;
 import org.apache.hupa.client.rf.HupaRequestFactory;
 import org.apache.hupa.shared.data.MessageImpl.IMAPFlag;
 import org.apache.hupa.shared.domain.FetchMessagesAction;
 import org.apache.hupa.shared.domain.FetchMessagesResult;
-import org.apache.hupa.shared.domain.GetMessageDetailsAction;
-import org.apache.hupa.shared.domain.GetMessageDetailsResult;
 import org.apache.hupa.shared.domain.ImapFolder;
 import org.apache.hupa.shared.domain.Message;
-import org.apache.hupa.shared.events.RefreshUnreadEvent;
 
 import com.google.gwt.cell.client.CheckboxCell;
 import com.google.gwt.cell.client.DateCell;
@@ -530,7 +525,6 @@ import com.google.gwt.cell.client.ValueU
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.dom.client.Style.Unit;
 import com.google.gwt.event.shared.EventBus;
-import com.google.gwt.event.shared.HandlerRegistration;
 import com.google.gwt.i18n.client.DateTimeFormat;
 import com.google.gwt.place.shared.Place;
 import com.google.gwt.place.shared.PlaceController;
@@ -543,9 +537,7 @@ import com.google.gwt.view.client.AsyncD
 import com.google.gwt.view.client.DefaultSelectionEventManager;
 import com.google.gwt.view.client.HasData;
 import com.google.gwt.view.client.MultiSelectionModel;
-import com.google.gwt.view.client.NoSelectionModel;
 import com.google.gwt.view.client.ProvidesKey;
-import com.google.gwt.view.client.SelectionChangeEvent;
 import com.google.inject.Inject;
 import com.google.web.bindery.requestfactory.shared.Receiver;
 import com.google.web.bindery.requestfactory.shared.ServerFailure;
@@ -585,7 +577,6 @@ public class MessagesCellTable extends D
 		}
 	};
 	private final MultiSelectionModel<? super Message> selectionModel = new MultiSelectionModel<Message>(KEY_PROVIDER);
-//	public final NoSelectionModel<Message> noSelectionModel = new NoSelectionModel<Message>(KEY_PROVIDER);
 
 	PlaceController pc;
 	HupaRequestFactory rf;
@@ -647,9 +638,6 @@ public class MessagesCellTable extends D
 	@Inject protected HupaController hc;
 	@Inject EventBus eventBus;
 
-//	private HandlerRegistration selectionManagerReg = addCellPreviewHandler(DefaultSelectionEventManager
-//			.<Message> createCheckboxManager(0));
-
 	@Inject
 	public MessagesCellTable(final HupaImageBundle imageBundle, final HupaConstants constants,
 			final PlaceController pc, final HupaRequestFactory rf) {
@@ -697,53 +685,9 @@ public class MessagesCellTable extends D
 		// redraw();
 		setKeyboardSelectionPolicy(KeyboardSelectionPolicy.DISABLED);
 		setAutoHeaderRefreshDisabled(true);
-		// setSelectionModel(selectionModel,
-		// DefaultSelectionEventManager.<Message> createCheckboxManager(0));
 
 		setSelectionModel(selectionModel, DefaultSelectionEventManager.<Message> createBlacklistManager(0));
 
-//		selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
-//			@Override
-//			public void onSelectionChange(SelectionChangeEvent event) {
-//				message = eventselectionModel.get;
-//				GetMessageDetailsRequest req = rf.messageDetailsRequest();
-//				GetMessageDetailsAction action = req.create(GetMessageDetailsAction.class);
-//				final ImapFolder f = req.create(ImapFolder.class);
-//
-//				f.setFullName(parseFolderName(pc));
-//				action.setFolder(f);
-//				action.setUid(message.getUid());
-//				req.get(action).fire(new Receiver<GetMessageDetailsResult>() {
-//					@Override
-//					public void onSuccess(GetMessageDetailsResult response) {
-//						// display.getGrid().getSelectionModel().setSelected(event.getValue(),
-//						// true);
-//						// noSelectionModel.setSelected(message, true);
-//						toolBar.enableAllTools(true);
-//						ToolBarView.Parameters p = new ToolBarView.Parameters(null, folderName, message,
response
-//								.getMessageDetails());
-//						toolBar.setParameters(p);
-//						MessagePlace place = new MessagePlace(folderName + AbstractPlace.SPLITTER + message.getUid());
-//						refresh();
-//						eventBus.fireEvent(new RefreshUnreadEvent());
-//						pc.goTo(place);
-//					}
-//
-//					@Override
-//					public void onFailure(ServerFailure error) {
-//						if (error.isFatal()) {
-//							// log.log(Level.SEVERE, error.getMessage());
-//							// TODO write the error message to
-//							// status bar.
-//							toolBar.enableAllTools(false);
-//							throw new RuntimeException(error.getMessage());
-//						}
-//					}
-//				});
-//			}
-//
-//		});
-
 		if (dataProvider == null) {
 			dataProvider = new MessageListDataProvider();
 			dataProvider.addDataDisplay(this);



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