Author: dongxu
Date: Thu Sep 12 04:52:44 2013
New Revision: 1522408
URL: http://svn.apache.org/r1522408
Log:
fixed issue#79, using 100 as the assuming page size of labels list rather than
CellList's default page size 25
Modified:
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/FolderListView.ui.xml
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java
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=1522408&r1=1522407&r2=1522408&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:52:44 2013
@@ -47,6 +47,7 @@ import com.google.gwt.uibinder.client.Ui
import com.google.gwt.user.cellview.client.CellList;
import
com.google.gwt.user.cellview.client.HasKeyboardPagingPolicy.KeyboardPagingPolicy;
import
com.google.gwt.user.cellview.client.HasKeyboardSelectionPolicy.KeyboardSelectionPolicy;
+<<<<<<< HEAD
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.view.client.AsyncDataProvider;
@@ -241,8 +242,9 @@ import com.google.gwt.safehtml.shared.Sa
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.cellview.client.CellList;
+=======
+>>>>>>> fixed issue#79, using 100 as the assuming page size of labels list
rather than CellList's default page size 25
import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.ScrollPanel;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.view.client.AsyncDataProvider;
import com.google.gwt.view.client.HasData;
@@ -254,12 +256,13 @@ import com.google.web.bindery.requestfac
import com.google.web.bindery.requestfactory.shared.ServerFailure;
public class FolderListView extends Composite implements
FolderListActivity.Displayable {
- @UiField ScrollPanel thisView;
+ @UiField SimplePanel thisView;
@Inject private HupaController controller;
@Inject private ToolBarActivity.Displayable toolBar;
@Inject private MessageListActivity.Displayable msgListDisplay;
@Inject private PlaceController placeController;
private CellList<LabelNode> cellList;
+ private ShowMorePagerPanel pagerPanel;
<<<<<<< HEAD
@Inject
@@ -317,13 +320,24 @@ public class FolderListView extends Comp
@Source("res/CssLabelListView.css")
public CellList.Style cellListStyle();
}
+
+ public static final ProvidesKey<LabelNode> KEY_PROVIDER = new
ProvidesKey<LabelNode>() {
+ @Override
+ public Object getKey(LabelNode item) {
+ return item == null ? null : item.getPath();
+ }
+ };
@Inject
public FolderListView(final HupaRequestFactory rf) {
initWidget(binder.createAndBindUi(this));
data = new ImapLabelListDataProvider(rf);
- cellList = new CellList<LabelNode>(new FolderCell(),
Resources.INSTANCE);
+ pagerPanel = new ShowMorePagerPanel();
+ cellList = new CellList<LabelNode>(new FolderCell(),
Resources.INSTANCE, KEY_PROVIDER);
+
cellList.setKeyboardPagingPolicy(KeyboardPagingPolicy.INCREASE_RANGE);
+
cellList.setKeyboardSelectionPolicy(KeyboardSelectionPolicy.BOUND_TO_SELECTION);
+ cellList.setPageSize(100);// ShowMorePagerPanel does not work at
present. Therefore, assume one's labels are under one hundred
cellList.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new
SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent
event) {
@@ -334,7 +348,8 @@ public class FolderListView extends Comp
}
});
data.addDataDisplay(cellList);
- thisView.setWidget(cellList);
+ pagerPanel.setDisplay(cellList);
+ thisView.setWidget(pagerPanel);
}
@Override
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml?rev=1522408&r1=1522407&r2=1522408&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/FolderListView.ui.xml
Thu Sep 12 04:52:44 2013
@@ -16,6 +16,7 @@
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<<<<<<< HEAD
<<<<<<< HEAD
+<<<<<<< HEAD
<g:SimplePanel ui:field="thisView" />
=======
=======
@@ -44,4 +45,7 @@
=======
<g:ScrollPanel ui:field="thisView" />
>>>>>>> fixed issue#67; fixed issue#69 (with default select inbox folder);
>>>>>>> fixed issue#70;
+=======
+ <g:SimplePanel ui:field="thisView" />
+>>>>>>> fixed issue#79, using 100 as the assuming page size of labels list
rather than CellList's default page size 25
</ui:UiBinder>
\ No newline at end of file
Modified:
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java
URL:
http://svn.apache.org/viewvc/james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java?rev=1522408&r1=1522407&r2=1522408&view=diff
==============================================================================
---
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java
(original)
+++
james/hupa/trunk/client/src/main/java/org/apache/hupa/client/ui/LabelListView.java
Thu Sep 12 04:52:44 2013
@@ -243,6 +243,7 @@ public class LabelListView extends Compo
initWidget(binder.createAndBindUi(this));
data = new ImapLabelListDataProvider(rf);
CellList<LabelNode> cellList = new CellList<LabelNode>(new
LabelCell(), Resources.INSTANCE);
+ cellList.setPageSize(100);// assume one's labels are under one
hundred, otherwise we need a pager
cellList.setSelectionModel(selectionModel);
selectionModel.addSelectionChangeHandler(new
SelectionChangeEvent.Handler() {
public void onSelectionChange(SelectionChangeEvent
event) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]